[zeromq-dev] Uninitialised command_t and decoder asserts

Michael Small michaelsmall at me.com
Fri Jan 14 02:48:10 CET 2011


Hi,

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? 



More information about the zeromq-dev mailing list