|
From: Konstantin S. <kon...@gm...> - 2008-03-13 15:46:47
|
On Thu, Mar 13, 2008 at 6:30 PM, Bart Van Assche <bar...@gm...> wrote: > On Thu, Mar 13, 2008 at 2:35 PM, Erik Sandberg <san...@vi...> wrote: > > > I'm working with a large project, where Helgrind gives a couple of false > > positives. I've been communicating with Julian for a while, but thought > > it's better to talk to this list. > > Please try exp-drd. No false positives, no need for annotations. Right, exp-drd is pure happens-before detector. Helgrind also has such mode, but this mode could be applied to a single mutex, rather than to all mutexes. If you mark some particular mutex with VG_USERREQ__HG_MUTEX_IS_USED_AS_CONDVAR, helgrind will create a happens-before arc between Unlock and Lock. This will also help in this case. I think test61 (http://code.google.com/p/data-race-test/source/browse/trunk/unittest/racecheck_unittest.cc?r=256#2795) is very close to Erik's original bug.c But please note, that MUTEX_IS_USED_AS_CONDVAR is a big hummer and if used too often will kill helgrind's performance (if not exhaust available RAM before that). --kcc |