From: Bart Van Assche Date: Sun, 1 Apr 2012 15:06:57 +0000 (+0000) Subject: drd: Reenable reporting races on stack variables that are shared over threads for... X-Git-Tag: svn/VALGRIND_3_8_0~378 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f244dcefb6d270c8209f6f982620d82f0b723698;p=thirdparty%2Fvalgrind.git drd: Reenable reporting races on stack variables that are shared over threads for --check-stack-var=yes. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12475 --- diff --git a/drd/drd_load_store.c b/drd/drd_load_store.c index 6eae573b39..996ee61173 100644 --- a/drd/drd_load_store.c +++ b/drd/drd_load_store.c @@ -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)(), diff --git a/drd/tests/hg05_race2.stderr.exp b/drd/tests/hg05_race2.stderr.exp index d18786f806..f9a47f4168 100644 --- a/drd/tests/hg05_race2.stderr.exp +++ b/drd/tests/hg05_race2.stderr.exp @@ -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 index 0000000000..e38c7ea174 --- /dev/null +++ b/drd/tests/hg05_race2.stderr.exp-powerpc @@ -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)