[zeromq-dev] Potential bug in select

Ilya Kulakov kulakov.ilya at gmail.com
Thu Jan 28 12:57:14 CET 2016


There are 2 things that make this code look buggy:

1. Behavior of select is undefined if either of sets it owns getting modified
2. Even if it's safe on some platforms, it's still possible to call select with a descriptor which will retire a moment later.
    Moreover, in current implementation fd_set can be modified while being copied via memcpy.
    There should be a lock that will protect data.

Best Regards,
Ilya Kulakov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160128/2a100823/attachment.htm>


More information about the zeromq-dev mailing list