Closed chu11 closed 1 year ago
I'm not sure if you are correct. Often an assert does nothing when you do a release build. So in that case a memory exhaustion can happen.
generally speaking you are correct, but it appears czmq builds them in. see:
https://github.com/zeromq/czmq/issues/1193
unless czmq has changed since that thread.
I can minimally confirm to have hit some asserts in some czmq classes on some other random bugs using the czmq built by redhat.
Yeah, wouldn't wanna do without these asserts. Sorry for the delay in merging this PR. If you are a frequent user of czmq or other 0mq projects we could use some help handling these PR's.
I noticed a few comments in the headers for zlist/zlistx that mention errors are returned on out of memory conditions. I believe those errors are no longer possible, as czmq is built with asserts to bail if any internal memory allocation fails. Apologies if I'm wrong about this.
For
zlist
, I just changed the example error of "out of memory" to "invalid input", which is a real possible error. Forzlistx
, I just removed the offending text.