Had issues with this test too. And I do not understand what exactly is 
it testing. First, memcmp returns zero if two byte strings are equal. We 
assert that it is non-zero in all cases of test_monitor. So test passes 
if memcmp fails everywhere. Is it really an intended behaviour? Second, 
memcmp compares 22 bytes of memory, while addr char array 
"tcp://127.0.0.1:5560" has only 20 bytes (not counting trailing zero 
terminator). memcmp does not stop like strcmp when it finds a '\0' 
character, it simply compares passed amount of bytes. So we definitely 
read memory that does not belong to us. I'm not surprised that it 
crashes sometimes.

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to