I've downloaded zeromq version 2.0.10 and configured/compiled without any special options on my x86_64 ubuntu 10.04 LTS machine. Using version 3.6.0 of valgrind, I thought I'd take the 'helgrind' thread safety checker for a spin to evaluate zeromq.
It seems even the most basic program that I can come up with generates a lot of errors, I think it has something to do with the I/O thread (being started by the zmq_init() call) clashing with the main thread.
This is the sample program I used:
Example helgrind output for this program can be found at http://pastebin.com/0uFCpxUB
For instance, I'm particularly worried about line 196 in the pastebin output and further as an example. In this case, the main thread of the program has called zmq_socket() and somehow that clashes with the I/O thread.
My question: Am I doing anything wrong here in my sample code? Did I forget to pass some kind of special configure flag or is Helgrind perhaps wrong in complaining? Any ideas?