On Tue, 2014-08-19 at 22:11 +0200, David Faure wrote:
> > > I'm still trying to find a way to annotate threadsafe-statics so that
> > > helgrind doesn't complain about them.
> > 
> > What is a threadsafe-static ?
> 
> See older mail to this list, attached.
> 
> It doesn't use __thread anywhere, but rather lets gcc take care of ensuring 
> thread-safety on static objects (like C++11 mandates, but it has been doing 
> so 
> for a long time already).
Quickly re-reading the mail, this is not related.
I see that drd has some interceptions that does annotate
these like a mutex lock/unlock (see drd/drd_libstdcxx_intercepts.c)
and has a test which looks like your problem in
drd/tests/local_static.cpp

I think a similar code is (trivially) doable for helgrind,
inside helgrind/hg_intercepts.c

> Is that related to nptl (I'm not sure what that is exactly)?
nptl = new posix thread library (not so new now :).
It is just the glibc pthread library.
The kludge I am doing is not related to your problem.

Philippe



------------------------------------------------------------------------------
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to