Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In function nni_posix_poll_thr losing EPOLLHUP flag causes the code in this function tcp_cb to be executed incorrectly and continue #2100

Open
wangchen61698 opened this issue Feb 11, 2025 · 0 comments

Comments

@wangchen61698
Copy link

Describe the bug
I encountered potential bugs using nng(v1.5.2)
In posix_pollq_epoll.c,fuction nni_posix_poll_thr,the value mask will recoder EPOLLIN,EPOLLOUT and EPOLLERR these flag(line279 ~ line281).If the ev->events includes EPOLLHUP flag,The mask will lose EPOLLHUP flag.
Image
When the excuted cb is function tcp_cb
The check condition of the event(posix_tcpconn.c line236 ~239) is to check NNI_POLL_HUP,NNI_POLL_ERR and NNI_POLL_INVAL.
Image
However in fuction nni_posix_poll_thr, It loses EPOLLHUP flag,the tcp_cb don’t check the flag,The code continues to execute incorrectly
Image

wangchen61698 added a commit to wangchen61698/nng that referenced this issue Feb 13, 2025
…xecuting in tcp_cb

the reason of the modification refers to nanomsg#2100

Signed-off-by: wangchen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant