[zeromq-dev] Race condition in zmq_engine_t::out_event

Christian Gudrian christian at gudrian.org
Fri Nov 12 15:53:29 CET 2010


The method zmq_engine_t::out_event gets called concurrently by (at 
least) two worker threads during test_shutdown_stress. If there are data 
to be written, they get written twice and as a consequence the outsize 
member gets decremented too often resulting in an integer underflow. 
That in turn triggers subsequent errors, of course.

Shouldn't the out_event method be synchronized then?


More information about the zeromq-dev mailing list