]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
drd: Reenable reporting races on stack variables that are shared over threads for...
authorBart Van Assche <bvanassche@acm.org>
Sun, 1 Apr 2012 15:06:57 +0000 (15:06 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 1 Apr 2012 15:06:57 +0000 (15:06 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12475

drd/drd_load_store.c
drd/tests/hg05_race2.stderr.exp
drd/tests/hg05_race2.stderr.exp-powerpc [new file with mode: 0644]

index 6eae573b39623a0c1f5a76cb6d90e7dbcd04050a..996ee611736b9ac8f63b595d2d93b18a21f1de01 100644 (file)
@@ -140,7 +140,8 @@ static void drd_report_race(const Addr addr, const SizeT size,
    ThreadId vg_tid;
 
    vg_tid = VG_(get_running_tid)();
-   if (DRD_(thread_address_on_any_stack)(addr)) {
+   if (!DRD_(get_check_stack_accesses)()
+       && DRD_(thread_address_on_any_stack)(addr)) {
 #if 0
       GenericErrInfo GEI = {
          .tid = DRD_(thread_get_running_tid)(),
index d18786f80668a209115b4a13cf5e8afa8d9cd471..f9a47f41688894b2c342ad19b70c98264ad5a600 100644 (file)
@@ -1,3 +1,24 @@
 
+Thread 3:
+Conflicting load by thread 3 at 0x........ size 4
+   at 0x........: th (hg05_race2.c:17)
+   by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
+Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
+declared at hg05_race2.c:24, in frame #? of thread 1
+Other segment start (thread 2)
+   (thread finished, call stack no longer available)
+Other segment end (thread 2)
+   (thread finished, call stack no longer available)
 
-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+Conflicting store by thread 3 at 0x........ size 4
+   at 0x........: th (hg05_race2.c:17)
+   by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
+Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
+declared at hg05_race2.c:24, in frame #? of thread 1
+Other segment start (thread 2)
+   (thread finished, call stack no longer available)
+Other segment end (thread 2)
+   (thread finished, call stack no longer available)
+
+
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
diff --git a/drd/tests/hg05_race2.stderr.exp-powerpc b/drd/tests/hg05_race2.stderr.exp-powerpc
new file mode 100644 (file)
index 0000000..e38c7ea
--- /dev/null
@@ -0,0 +1,22 @@
+
+Thread 3:
+Conflicting load by thread 3 at 0x........ size 4
+   at 0x........: th (hg05_race2.c:17)
+   by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
+Allocation context: unknown.
+Other segment start (thread 2)
+   (thread finished, call stack no longer available)
+Other segment end (thread 2)
+   (thread finished, call stack no longer available)
+
+Conflicting store by thread 3 at 0x........ size 4
+   at 0x........: th (hg05_race2.c:17)
+   by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
+Allocation context: unknown.
+Other segment start (thread 2)
+   (thread finished, call stack no longer available)
+Other segment end (thread 2)
+   (thread finished, call stack no longer available)
+
+
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)