|
From: Bart V. A. <bva...@ac...> - 2011-03-12 14:33:07
|
On Fri, Mar 11, 2011 at 10:07 PM, <sv...@va...> wrote: > Author: sewardj > Date: 2011-03-11 21:06:59 +0000 (Fri, 11 Mar 2011) > New Revision: 11627 > > Log: > Add free-is-write functionality (experimental, not enabled by default). I have a quiz question for the fans of the --free-is-write=yes mode: why do Helgrind and DRD (and TSan probably too) report a race on drd/tests/annotate_smart_pointer ? And once you have found the answer to that question: any suggestions for how to avoid such complaints ? $ ./vg-in-place -q --tool=helgrind drd/tests/annotate_smart_pointer Done. $ ./vg-in-place -q --tool=helgrind --free-is-write=yes drd/tests/annotate_smart_pointer ==811== Thread #1 is the program's root thread ==811== ==811== Thread #2 was created ==811== at 0x589463E: clone (clone.S:77) ==811== by 0x4E33D23: do_clone.clone.0 (createthread.c:75) ==811== by 0x4E350CC: pthread_create@@GLIBC_2.2.5 (createthread.c:249) ==811== by 0x4C27407: pthread_create_WRK (hg_intercepts.c:257) ==811== by 0x4C275AA: pthread_create@* (hg_intercepts.c:288) ==811== by 0x4011D0: main (annotate_smart_pointer.cpp:145) ==811== ==811== Possible data race during write of size 4 at 0x5b2e0b0 by thread #1 ==811== at 0x4C256D4: operator delete(void*) (vg_replace_malloc.c:387) ==811== by 0x40124B: main (annotate_smart_pointer.cpp:246) ==811== This conflicts with a previous read of size 4 by thread #2 ==811== at 0x400DE6: thread_func(void*) (annotate_smart_pointer.cpp:114) ==811== by 0x4C27593: mythread_wrapper (hg_intercepts.c:221) ==811== by 0x4E34A3E: start_thread (pthread_create.c:297) ==811== by 0x589467C: clone (clone.S:112) ==811== Done. Bart. |