|
From: Paul A. <pa...@vi...> - 2011-11-10 23:02:34
|
I've also found that if I collapse the "Instance" layer and create the threads directly from main() instead, the problem seems to go away. This leads me to the possible conclusion that HG is having an issue with data access from a thread created by a (non-main) thread. Paul > -----Original Message----- > From: Bart Van Assche [mailto:bar...@gm...] > Sent: Wednesday, November 09, 2011 11:11 AM > To: Paul Archard > Cc: val...@li... > Subject: Re: [Valgrind-users] Thread local storage (TLS) support > > On Wed, Nov 9, 2011 at 7:18 PM, Paul Archard > <pa...@vi...> wrote: > > Could someone in the know please clarify the support of TLS in > Valgrind/Helgrind? > > > > I am running Helgrind (version 3.7.0) on our code, which makes heavy > use of TLS on GCC 4.5.1 with GLIBC 2.13. I am seeing a lot of what I > believe are false positives, where a thread local variable is read on > one thread and set on another "simultaneously". I don't see any > possible way that there is contention since different threads are > involved and by definition this access is safe. This leads me to > believe that Helgrind is not recognizing the fact that the variables > are thread-local. > > > > I have tried using VALGRIND_HG_DISABLE_CHECKING( ) on some of these > variables, but even that seems to not work consistently. It's > important to us for Valgrind tests to pass since we need to hand off > the binaries to another group and they use Valgrind to validate their > releases. > > TLS should be supported by Helgrind and DRD. If you can post a minimal > example that allows to reproduce the issue you observed with TLS we > can have a closer look at it. > > Bart. |