[zeromq-dev] Potential bug in select
Ilya Kulakov
kulakov.ilya at gmail.com
Wed Jan 27 16:15:06 CET 2016
Hi,
I found the following 2 chunks of code suspecting:
- https://github.com/zeromq/libzmq/blob/master/src/select.cpp#L110-L113 <https://github.com/zeromq/libzmq/blob/master/src/select.cpp#L110-L113>
- https://github.com/zeromq/libzmq/blob/master/src/select.cpp#L170-L173 <https://github.com/zeromq/libzmq/blob/master/src/select.cpp#L170-L173>
Why do we need to clear descriptos, if readfds/writefds/exceptfds are initialized with contents of source_set_* at each iteration of the loop?
It may lead to an error if set is modified _while_ there is an active select in another thread (I don't know if an instance of select_t can be used from multiple threads).
Other than that this code looks pointless.
What do you think?
Best Regards,
Ilya Kulakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160127/48afb89f/attachment.htm>
More information about the zeromq-dev
mailing list