libzmq
libzmq copied to clipboard
ACCESS_VIOLATION errors due to nullptr writes in wepoll.c
I experienced ACCESS_VIOLATION errors when using libzmq in a rust project, originating from wepoll.c.
Affected lines: https://github.com/zeromq/libzmq/blob/master/external/wepoll/wepoll.c#L1223 https://github.com/zeromq/libzmq/blob/master/external/wepoll/wepoll.c#L1842
I opened an issue in the wepoll project at: https://github.com/piscisaureus/wepoll/issues/32
This issue probably comes from using the distribution wepoll
with the patched version that the polling
crate uses. polling
patches wepoll
so that a null completion packet can be used to wake up an ongoing poll operation, which is necessary for futures to be able to run themselves. If the distribution wepoll
is overriding the patched wepoll
, this means that a null packet sent by polling
will cause a segmentation fault.
See smol-rs/polling#85 and Aclysma/wepoll-ffi#1. I doubt this is an issue with libzmq
at this stage.