[zeromq-dev] inproc: passing an object pointer between threads causing datarace?? (3.2.2 stable release)

Kah-Chan Low kahchanlow at yahoo.com
Thu Nov 29 01:28:42 CET 2012


Thanks Peter!
BTW
Regarding question 2 below, is my concern unfounded?  I think I should be fine but I just want to make sure...


>I have two questions:
>1. I don't understand the error message above: how does accessing the value of variable n have anything to >do with the internals of ZMQ?
>2. Is it possible for the compiler to rearrange the machine instructions such that the assignment of value >of n (i.e. *n=4; *n += 2;) occurs after the message has been sent and received on the other thread?  In >this case, is it possible for the program to output any value other than '6' for 'n'?


________________________________
 From: Pieter Hintjens <ph at imatix.com>
To: Kah-Chan Low <kahchanlow at yahoo.com>; ZeroMQ development list <zeromq-dev at lists.zeromq.org> 
Sent: Tuesday, November 27, 2012 11:40 PM
Subject: Re: [zeromq-dev] inproc: passing an object pointer between threads causing datarace?? (3.2.2 stable release)
 
On Wed, Nov 28, 2012 at 6:23 AM, Kah-Chan Low <kahchanlow at yahoo.com> wrote:

> This error can not be suppressed by using CPPFLAGS=-DZMQ_MAKE_VALGRIND_HAPPY
> to build zmq.

There's a valgrind suppression file, attached. You should be able to
add the exception you need to this.

-Pieter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121128/ac83489b/attachment.htm>


More information about the zeromq-dev mailing list