On mardi 25 septembre 2018 16:17:48 CEST John Perry wrote: > > On Sep 25, 2018, at 7:02 AM, Tom Hughes <t...@compton.nu> wrote: > > > > I don't believe helgrind makes any attempt to observe atomic > > operations so it is entirely unaware of them and of any effect > > they might have on the thread correctness of a program. > > > > It would be hard to do because where the compiler is able to > > generate direction instructions for the atomic there will be no > > function call to intercept, and as there won't necessarily be a > > one-one mapping from atomic operations to CPU instructions it > > is hard to determine what the original operation was by > > observing the instruction stream. > > Thank you! This comes as a huge relief, because I first noticed the issue in > a program I was writing where I used that approach and worried I was doing > something very, very bad. Now I can rest easy. Or at least easier.
You want to use TSAN (thread-sanitizer) instead (preferably with clang and libc++, in my experience), which supports atomic operations. Sorry for advertising a competing solution on the valgrind mailing-list ;-) I admit I'm much less of a helgrind fan since tsan started to work well. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users