On Monday 09 June 2014 08:39:45 Patrick J. LoPresti wrote:
> Interesting! So on x86 and similar, they implement thread-safe Meyers
> singletons via the double-checked locking anti-pattern... Which is
> actually safe thanks to Intel's not-exactly-relaxed memory model.

Interesting indeed.
 
> > If g++ would be modified such that the "if (!guard.first_byte)" test can
> > be skipped at run-time then it would become possible for Helgrind and
> > DRD to recognize static initialization
> 
> If I understand you correctly (?), you plan to ask the g++ maintainers
> to tamper with their fast path to make life easier for Helgrind (?)

Yeah, I can't really see that happening, either.
Unless some of you have a really good relationship with the gcc maintainers 
:-)
 
> If so, I would suggest having a Plan B...
> 
> Would it make sense to re-think the happens-before/happens-after
> annotation macros for C++11?

Not sure what you mean exactly, so at the risk of asking the same question:

would it be possible for me to annotate a global static with some special 
macros that make helgrind understand what's happening?

I know, annotating all global statics one by one sounds horrible, but actually 
in my case they're already encapsulated in a macro, and I just need a way to 
remove all these false positives in order for helgrind to be usable.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to