eproxy icon indicating copy to clipboard operation
eproxy copied to clipboard

bug?

Open cc861010 opened this issue 7 years ago • 3 comments

==20381== Process terminating with default action of signal 11 (SIGSEGV) ==20381== Access not within mapped region at address 0x100108 ==20381== at 0x404BB6: __list_del (list.h:91) ==20381== by 0x404BEC: list_del (list.h:97)

cc861010 avatar Jan 26 '18 08:01 cc861010

if (nfds < 0) {
	perror("epoll");
	continue;
}

应该改为if (nfds <= 0)

Rtoax avatar Dec 02 '20 09:12 Rtoax

==20381== Process terminating with default action of signal 11 (SIGSEGV) ==20381== Access not within mapped region at address 0x100108 ==20381== at 0x404BB6: __list_del (list.h:91) ==20381== by 0x404BEC: list_del (list.h:97)

if (nfds < 0) {
	perror("epoll");
	continue;
}

应该改为if (nfds <= 0)

Rtoax avatar Dec 02 '20 09:12 Rtoax

==20381== Process terminating with default action of signal 11 (SIGSEGV) ==20381== Access not within mapped region at address 0x100108 ==20381== at 0x404BB6: __list_del (list.h:91) ==20381== by 0x404BEC: list_del (list.h:97)

此外还有一个地方需要修改: 因为每次都会讲conn和other添加至全局链表,在关闭过程中遍历链表,此处不应释放两次

void closeconn(int efd, struct conn *conn)
{
	if (conn->other)
		delconn(efd, conn->other);
	delconn(efd, conn);		
}

应该为:

void closeconn(int efd, struct conn *conn)
{
	delconn(efd, conn);		
}

Rtoax avatar Dec 02 '20 10:12 Rtoax