Re: [zeromq-dev] libzmq and helgrind

2014-08-20 Thread Michi Henning
On 20 Aug 2014, at 1:24 , Thomas Rodgers rodg...@twrodgers.com wrote: Ignore the 4.1 stack smashing issue, that was a brain fart on my part... I ran this (again Ubuntu 14.04 gcc4.8), and this time actually changed the len 29 bytes (sorry it was late, I had the stupid), got the

Re: [zeromq-dev] libzmq and helgrind

2014-08-19 Thread Michi Henning
On 19/08/14 13:28, Thomas Rodgers wrote: ... then, having realizing that it linked against the Ubuntu installed default version (libzmq3), I re-ran this against libzmq4 and the current libzmq 'trunk'. I get no races/issues in libzmq3 or libzmq4, but 4.1 definitely seems to have a problem, in

Re: [zeromq-dev] libzmq and helgrind

2014-08-19 Thread Thomas Rodgers
Ignore the 4.1 stack smashing issue, that was a brain fart on my part... I ran this (again Ubuntu 14.04 gcc4.8), and this time actually changed the len 29 bytes (sorry it was late, I had the stupid), got the msg_t::close() race reported by helgrind. I think these are bogus reports, there is a

Re: [zeromq-dev] libzmq and helgrind

2014-08-18 Thread Thomas Rodgers
If the message size exceeds the 'vsm' message length limit, it becomes an 'lmsg'. This type is indeed heap allocated, and when the enclosing message type is copied, the copies share the reference to the underlying heap allocation (and any potential data races that come along with that). The

Re: [zeromq-dev] libzmq and helgrind

2014-08-18 Thread Michi Henning
Hi Thomas, thanks for the quick answer! If the message size exceeds the 'vsm' message length limit, it becomes an 'lmsg'. This type is indeed heap allocated, and when the enclosing message type is copied, the copies share the reference to the underlying heap allocation (and any potential

Re: [zeromq-dev] libzmq and helgrind

2014-08-18 Thread Thomas Rodgers
H, I just ran this on my *nix box (Ubuntu 14.04, gcc4.8) with helgrind and I get no races in zmq::msg_t::close() reported, nor do I see anything in the implementation of zmq::msg_t::close() that's likely racey in practice. On Monday, August 18, 2014, Michi Henning mi...@triodia.com wrote:

Re: [zeromq-dev] libzmq and helgrind

2014-08-18 Thread Thomas Rodgers
... then, having realizing that it linked against the Ubuntu installed default version (libzmq3), I re-ran this against libzmq4 and the current libzmq 'trunk'. I get no races/issues in libzmq3 or libzmq4, but 4.1 definitely seems to have a problem, in that this test program is triggering GCC's

[zeromq-dev] libzmq and helgrind

2014-08-17 Thread Michi Henning
Hi, I'm trying to put together a helgrind suppression file for use with zmq programs. There is lots of noise coming from helgrind without suppressions due to the lock-free stuff going on in zmq. I have a bunch of suppressions at the moment that get rid of some or the more common errors.