Helgrind and Meyers' singletons

Norbert Reher <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
Dear all,

I am analyzing a program with Helgrind for possible data races.
Thread-safe static initialization is used to implement singletons inside
the code.
As expected several false/positves are reported.

gcc version: 10.2.1
compile options: -std=c++17 -O3 -m64 -g ...
Valgrind version: 3.16.1.

So I was searching the mailing list for a possible work around to reduce
the number of false/positives reported and found a mail (with identical
subject) from Adriaan Schmidt dated 2016-11-28 14:42:43.

He used helgrind annotations ANNOTATE_HAPPENS_AFTER and
ANNOTATE_HAPPENS_BEFORE to make Helgrind warnings disappear for
singletons using thread-safe static initialization.

I haven't found any reply to his final question if the solution found
could brake the analysis.

If I missed the reply please let me know.

Thank you in advance.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.