[zeromq-dev] Uninitialised command_t and decoder asserts
Martin Sustrik
sustrik at 250bpm.com
Fri Jan 14 09:36:56 CET 2011
Michael,
> I've noticed random assertions mostly in decoder, and this seems to tie in with unitialised values of commant_t. While investing this I've noticed the following:
>
> #if defined ZMQ_MAKE_VALGRIND_HAPPY
> memset (&cmd, 0, sizeof (cmd));
> #endif
>
> Valgrind does indeed complain about these uninitialised values, and the randomness of the asserts (looping a REQ/REP test continually will only sometimes on some platforms cause the assertion even with the same library version).
>
> Is it expected that not initialising these values correctly will in fact cause potentially incorrect / unexpected behaviour in ZMQ?
0MQ is deliberately not initialising the whole command, just the
relevant part of it.
If you are getting asserts, try to produce minimal test case and report
the bug.
Martin
More information about the zeromq-dev
mailing list