Helgrind (Valgrind) and OpenMP (C): avoiding false positives?

Sorry to put this in as an answer since it’s more of a comment, but it’s too long to fit in as a comment, so here goes:

From the site you referenced.

Runtime support library for GNU OpenMP (part of GCC), at least for GCC
versions 4.2 and 4.3. The GNU OpenMP runtime library (libgomp.so)
constructs its own synchronisation primitives using combinations of
atomic memory instructions and the futex syscall, which causes total
chaos since in Helgrind since it cannot “see” those.

Fortunately, this can be solved using a configuration-time option (for
GCC). Rebuild GCC from source, and configure using
–disable-linux-futex. This makes libgomp.so use the standard POSIX threading primitives instead. Note that this was tested using GCC
4.2.3 and has not been re-tested using more recent GCC versions. We would appreciate hearing about any successes or failures with more
recent versions.

as you mentioned in your post, this has to do with libgomp.so, but that’s a shared object, so I don’t see how you can pass the -static flag and still use that library. Am I just misinformed?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)