[zeromq-dev] Uninitialised command_t and decoder asserts

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


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:

    memset (&cmd, 0, sizeof (cmd));

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