From: Julian Seward Date: Sun, 9 Nov 2008 20:47:57 +0000 (+0000) Subject: Update baseline expected outputs, now that Helgrind uses a different X-Git-Tag: svn/VALGRIND_3_4_0~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4757ac5356f0a4c49c2b3d77b3d01e80bb25c8d1;p=thirdparty%2Fvalgrind.git Update baseline expected outputs, now that Helgrind uses a different algorithm than in 3.3.x. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8750 --- diff --git a/helgrind/libhb_core.c b/helgrind/libhb_core.c index 82159ba39e..3261f25321 100644 --- a/helgrind/libhb_core.c +++ b/helgrind/libhb_core.c @@ -42,7 +42,7 @@ #include "pub_tool_aspacemgr.h" #include "pub_tool_execontext.h" #include "pub_tool_errormgr.h" - +#include "pub_tool_options.h" // VG_(clo_verbosity) #include "hg_basics.h" #include "hg_wordset.h" #include "hg_lock_n_thread.h" @@ -2287,10 +2287,11 @@ static void vts_tab__do_GC ( Bool show_stats ) VG_(printf)("<>\n", vts_next_GC_at); } - if (1) { + if (VG_(clo_verbosity) > 1) { static UInt ctr = 0; tl_assert(nTab > 0); - VG_(printf)("libhb: VTS GC: #%u old size %lu live %lu (%2llu%%)\n", + VG_(message)(Vg_DebugMsg, + "libhb: VTS GC: #%u old size %lu live %lu (%2llu%%)", ctr++, nTab, nLive, (100ULL * nLive) / nTab); } } diff --git a/helgrind/tests/hg03_inherit.stderr.exp-glibc25-amd64 b/helgrind/tests/hg03_inherit.stderr.exp-glibc25-amd64 index 46c6e53582..117205b8f1 100644 --- a/helgrind/tests/hg03_inherit.stderr.exp-glibc25-amd64 +++ b/helgrind/tests/hg03_inherit.stderr.exp-glibc25-amd64 @@ -1,6 +1,4 @@ -Thread #1 is the program's root thread - Thread #3 was created at 0x........: clone (in /...libc...) by 0x........: ... @@ -8,16 +6,16 @@ Thread #3 was created by 0x........: pthread_create@* (hg_intercepts.c:...) by 0x........: main (hg03_inherit.c:46) -Possible data race during write of size 4 at 0x........ +Thread #1 is the program's root thread + +Possible data race during write of size 4 at 0x........ by thread #3 at 0x........: t2 (hg03_inherit.c:28) by 0x........: mythread_wrapper (hg_intercepts.c:...) by 0x........: ... by 0x........: ... - Old state: shared-readonly by threads #1, #3 - New state: shared-modified by threads #1, #3 - Reason: this thread, #3, holds no consistent locks - Location 0x........ has never been protected by any lock - Location 0x........ is 0 bytes inside shared[1], - declared at hg03_inherit.c:11, in frame #0 of thread 3 + This conflicts with a previous access by thread #1 + at 0x........: main (hg03_inherit.c:60) + Location 0x........ is 0 bytes inside shared[1], + declared at hg03_inherit.c:11, in frame #0 of thread 3 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/hg04_race.stderr.exp-glibc25-amd64 b/helgrind/tests/hg04_race.stderr.exp-glibc25-amd64 index 75afd8be68..5aabafa7b5 100644 --- a/helgrind/tests/hg04_race.stderr.exp-glibc25-amd64 +++ b/helgrind/tests/hg04_race.stderr.exp-glibc25-amd64 @@ -1,28 +1,29 @@ -Thread #2 was created +Thread #3 was created at 0x........: clone (in /...libc...) by 0x........: ... by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...) by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: main (hg04_race.c:19) + by 0x........: main (hg04_race.c:21) -Thread #3 was created +Thread #2 was created at 0x........: clone (in /...libc...) by 0x........: ... by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...) by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: main (hg04_race.c:21) + by 0x........: main (hg04_race.c:19) -Possible data race during write of size 4 at 0x........ +Possible data race during read of size 4 at 0x........ by thread #3 + at 0x........: th (hg04_race.c:10) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + by 0x........: ... + by 0x........: ... + This conflicts with a previous access by thread #2 at 0x........: th (hg04_race.c:10) by 0x........: mythread_wrapper (hg_intercepts.c:...) by 0x........: ... by 0x........: ... - Old state: shared-readonly by threads #2, #3 - New state: shared-modified by threads #2, #3 - Reason: this thread, #3, holds no consistent locks - Location 0x........ has never been protected by any lock - Location 0x........ is 0 bytes inside local var "shared" - declared at hg04_race.c:6, in frame #0 of thread 2 + Location 0x........ is 0 bytes inside local var "shared" + declared at hg04_race.c:6, in frame #0 of thread 2 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/hg05_race2.stderr.exp-glibc25-amd64 b/helgrind/tests/hg05_race2.stderr.exp-glibc25-amd64 index 81bbbaad13..6797e8805b 100644 --- a/helgrind/tests/hg05_race2.stderr.exp-glibc25-amd64 +++ b/helgrind/tests/hg05_race2.stderr.exp-glibc25-amd64 @@ -1,28 +1,29 @@ -Thread #2 was created +Thread #3 was created at 0x........: clone (in /...libc...) by 0x........: ... by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...) by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: main (hg05_race2.c:27) + by 0x........: main (hg05_race2.c:29) -Thread #3 was created +Thread #2 was created at 0x........: clone (in /...libc...) by 0x........: ... by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...) by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: main (hg05_race2.c:29) + by 0x........: main (hg05_race2.c:27) -Possible data race during write of size 4 at 0x........ +Possible data race during read of size 4 at 0x........ by thread #3 + at 0x........: th (hg05_race2.c:17) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + by 0x........: ... + by 0x........: ... + This conflicts with a previous access by thread #2 at 0x........: th (hg05_race2.c:17) by 0x........: mythread_wrapper (hg_intercepts.c:...) by 0x........: ... by 0x........: ... - Old state: shared-readonly by threads #2, #3 - New state: shared-modified by threads #2, #3 - Reason: this thread, #3, holds no consistent locks - Location 0x........ has never been protected by any lock - Location 0x........ is 0 bytes inside foo.poot[5].plop[11], - declared at hg05_race2.c:24, in frame #4 of thread 1 + Location 0x........ is 0 bytes inside foo.poot[5].plop[11], + declared at hg05_race2.c:24, in frame #4 of thread 1 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc01_simple_race.stderr.exp-glibc25-amd64 b/helgrind/tests/tc01_simple_race.stderr.exp-glibc25-amd64 index 47265d21be..75fcec0136 100644 --- a/helgrind/tests/tc01_simple_race.stderr.exp-glibc25-amd64 +++ b/helgrind/tests/tc01_simple_race.stderr.exp-glibc25-amd64 @@ -8,13 +8,14 @@ Thread #2 was created by 0x........: pthread_create@* (hg_intercepts.c:...) by 0x........: main (tc01_simple_race.c:22) -Possible data race during write of size 4 at 0x........ +Possible data race during read of size 4 at 0x........ by thread #1 at 0x........: main (tc01_simple_race.c:28) - Old state: shared-readonly by threads #1, #2 - New state: shared-modified by threads #1, #2 - Reason: this thread, #1, holds no consistent locks - Location 0x........ has never been protected by any lock - Location 0x........ is 0 bytes inside global var "x" - declared at tc01_simple_race.c:9 + This conflicts with a previous access by thread #2 + at 0x........: child_fn (tc01_simple_race.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + by 0x........: ... + by 0x........: ... + Location 0x........ is 0 bytes inside global var "x" + declared at tc01_simple_race.c:9 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc04_free_lock.stderr.exp-glibc25-amd64 b/helgrind/tests/tc04_free_lock.stderr.exp-glibc25-amd64 index b14e3b64c4..8a4ba6d576 100644 --- a/helgrind/tests/tc04_free_lock.stderr.exp-glibc25-amd64 +++ b/helgrind/tests/tc04_free_lock.stderr.exp-glibc25-amd64 @@ -1,35 +1,9 @@ Thread #1 is the program's root thread -Thread #1 deallocated location 0x........ containing a locked lock - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (tc04_free_lock.c:24) - Lock at 0x........ was first observed - at 0x........: pthread_mutex_init (hg_intercepts.c:...) - by 0x........: main (tc04_free_lock.c:20) +Thread #1: Exiting thread still holds 2 locks + at 0x........: _Exit (in /...libc...) + by 0x........: ... + by 0x........: (below main) (in /...libc...) -Thread #1 deallocated location 0x........ containing a locked lock - at 0x........: bar (tc04_free_lock.c:40) - by 0x........: main (tc04_free_lock.c:26) - Lock at 0x........ was first observed - at 0x........: pthread_mutex_lock (hg_intercepts.c:...) - by 0x........: bar (tc04_free_lock.c:38) - by 0x........: main (tc04_free_lock.c:26) - -Thread #1 deallocated location 0x........ containing a locked lock - at 0x........: foo (tc04_free_lock.c:49) - by 0x........: main (tc04_free_lock.c:27) - Lock at 0x........ was first observed - at 0x........: pthread_mutex_init (hg_intercepts.c:...) - by 0x........: foo (tc04_free_lock.c:46) - by 0x........: main (tc04_free_lock.c:27) - -Thread #1 deallocated location 0x........ containing a locked lock - at 0x........: bar (tc04_free_lock.c:40) - by 0x........: main (tc04_free_lock.c:28) - Lock at 0x........ was first observed - at 0x........: pthread_mutex_lock (hg_intercepts.c:...) - by 0x........: bar (tc04_free_lock.c:38) - by 0x........: main (tc04_free_lock.c:28) - -ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0) +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc05_simple_race.stderr.exp-glibc25-amd64 b/helgrind/tests/tc05_simple_race.stderr.exp-glibc25-amd64 index 50ecb4af2f..cc62199eda 100644 --- a/helgrind/tests/tc05_simple_race.stderr.exp-glibc25-amd64 +++ b/helgrind/tests/tc05_simple_race.stderr.exp-glibc25-amd64 @@ -8,13 +8,14 @@ Thread #2 was created by 0x........: pthread_create@* (hg_intercepts.c:...) by 0x........: main (tc05_simple_race.c:27) -Possible data race during write of size 4 at 0x........ +Possible data race during read of size 4 at 0x........ by thread #1 at 0x........: main (tc05_simple_race.c:33) - Old state: shared-readonly by threads #1, #2 - New state: shared-modified by threads #1, #2 - Reason: this thread, #1, holds no consistent locks - Location 0x........ has never been protected by any lock - Location 0x........ is 0 bytes inside global var "y" - declared at tc05_simple_race.c:10 + This conflicts with a previous access by thread #2 + at 0x........: child_fn (tc05_simple_race.c:19) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + by 0x........: ... + by 0x........: ... + Location 0x........ is 0 bytes inside global var "y" + declared at tc05_simple_race.c:10 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc06_two_races.c b/helgrind/tests/tc06_two_races.c index 65c83efcc9..4eaf9dda01 100644 --- a/helgrind/tests/tc06_two_races.c +++ b/helgrind/tests/tc06_two_races.c @@ -4,7 +4,7 @@ #include /* Simple test program, has two races. A happens-before detector can only - ever detect one of them, though. */ + ever detect one of them, though. XXX: apparently not so; Drd and H 3.4 detect both. */ int unprot1 = 0, unprot2 = 0, prot = 0; pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER; diff --git a/helgrind/tests/tc06_two_races.stderr.exp-glibc25-amd64 b/helgrind/tests/tc06_two_races.stderr.exp-glibc25-amd64 index e95ae9ad73..a750f11501 100644 --- a/helgrind/tests/tc06_two_races.stderr.exp-glibc25-amd64 +++ b/helgrind/tests/tc06_two_races.stderr.exp-glibc25-amd64 @@ -8,22 +8,24 @@ Thread #2 was created by 0x........: pthread_create@* (hg_intercepts.c:...) by 0x........: main (tc06_two_races.c:26) -Possible data race during write of size 4 at 0x........ +Possible data race during read of size 4 at 0x........ by thread #1 at 0x........: main (tc06_two_races.c:31) - Old state: shared-readonly by threads #1, #2 - New state: shared-modified by threads #1, #2 - Reason: this thread, #1, holds no consistent locks - Location 0x........ has never been protected by any lock - Location 0x........ is 0 bytes inside global var "unprot1" - declared at tc06_two_races.c:9 + This conflicts with a previous access by thread #2 + at 0x........: child_fn (tc06_two_races.c:14) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + by 0x........: ... + by 0x........: ... + Location 0x........ is 0 bytes inside global var "unprot1" + declared at tc06_two_races.c:9 -Possible data race during write of size 4 at 0x........ +Possible data race during read of size 4 at 0x........ by thread #1 at 0x........: main (tc06_two_races.c:35) - Old state: shared-readonly by threads #1, #2 - New state: shared-modified by threads #1, #2 - Reason: this thread, #1, holds no consistent locks - Location 0x........ has never been protected by any lock - Location 0x........ is 0 bytes inside global var "unprot2" - declared at tc06_two_races.c:9 + This conflicts with a previous access by thread #2 + at 0x........: child_fn (tc06_two_races.c:18) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + by 0x........: ... + by 0x........: ... + Location 0x........ is 0 bytes inside global var "unprot2" + declared at tc06_two_races.c:9 ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc16_byterace.c b/helgrind/tests/tc16_byterace.c index 1916c37fbd..70a9101a6e 100644 --- a/helgrind/tests/tc16_byterace.c +++ b/helgrind/tests/tc16_byterace.c @@ -10,7 +10,7 @@ void* child_fn ( void* arg ) { int i; for (i = 0; i < 5; i++) - bytes[2*i + 0] ++; + bytes[2*i + 0] ++; /* child accesses: 0 2 4 6 8 */ return NULL; } @@ -27,11 +27,11 @@ int main ( void ) /* Unprotected relative to child, but harmless, since different bytes accessed */ for (i = 0; i < 5; i++) - bytes[2*i + 1] ++; + bytes[2*i + 1] ++; /* accesses: 1 3 5 7 9 */ /* Unprotected relative to child, but harmful; same bytes */ for (i = 0; i < 3; i++) - bytes[3*i + 1] ++; + bytes[3*i + 1] ++; /* accesses: 1 4(race!) 7 */ if (pthread_join(child, NULL)) { perror("pthread join"); diff --git a/helgrind/tests/tc16_byterace.stderr.exp-glibc25-amd64 b/helgrind/tests/tc16_byterace.stderr.exp-glibc25-amd64 index 74255e3e83..d71f603a49 100644 --- a/helgrind/tests/tc16_byterace.stderr.exp-glibc25-amd64 +++ b/helgrind/tests/tc16_byterace.stderr.exp-glibc25-amd64 @@ -8,13 +8,14 @@ Thread #2 was created by 0x........: pthread_create@* (hg_intercepts.c:...) by 0x........: main (tc16_byterace.c:22) -Possible data race during write of size 1 at 0x........ +Possible data race during read of size 1 at 0x........ by thread #1 at 0x........: main (tc16_byterace.c:34) - Old state: shared-readonly by threads #1, #2 - New state: shared-modified by threads #1, #2 - Reason: this thread, #1, holds no consistent locks - Location 0x........ has never been protected by any lock - Location 0x........ is 0 bytes inside bytes[4], - a global variable declared at tc16_byterace.c:7 + This conflicts with a previous access by thread #2 + at 0x........: child_fn (tc16_byterace.c:13) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + by 0x........: ... + by 0x........: ... + Location 0x........ is 0 bytes inside bytes[4], + a global variable declared at tc16_byterace.c:7 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/helgrind/tests/tc17_sembar.c b/helgrind/tests/tc17_sembar.c index ed3f4ca41f..cc91f5e0b1 100644 --- a/helgrind/tests/tc17_sembar.c +++ b/helgrind/tests/tc17_sembar.c @@ -7,10 +7,11 @@ /* This is really a test of semaphore handling (sem_{init,destroy,post,wait}). Using semaphores a barrier - function is created. Thrcheck does understand the barrier - semantics implied by the barrier, as pieced together from - happens-before relationships obtained from the component - semaphores. However, it does falsely report one race. Ah well. */ + function is created. Helgrind-3.3 (p.k.a Thrcheck) does understand + the barrier semantics implied by the barrier, as pieced together + from happens-before relationships obtained from the component + semaphores. However, it does falsely report one race. Ah well. + Helgrind-3.4 is pure h-b and so reports no races (yay!). */ /* This code is derived from gcc-4.3-20071012/libgomp/config/posix/bar.c, which is diff --git a/helgrind/tests/tc21_pthonce.stderr.exp-glibc25-amd64 b/helgrind/tests/tc21_pthonce.stderr.exp-glibc25-amd64 index 2bb2de0aa2..69ce61da16 100644 --- a/helgrind/tests/tc21_pthonce.stderr.exp-glibc25-amd64 +++ b/helgrind/tests/tc21_pthonce.stderr.exp-glibc25-amd64 @@ -1,28 +1,29 @@ -Thread #2 was created +Thread #3 was created at 0x........: clone (in /...libc...) by 0x........: ... by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...) by 0x........: pthread_create@* (hg_intercepts.c:...) by 0x........: main (tc21_pthonce.c:86) -Thread #3 was created +Thread #2 was created at 0x........: clone (in /...libc...) by 0x........: ... by 0x........: pthread_create@GLIBC_ (in /lib/libpthread...) by 0x........: pthread_create@* (hg_intercepts.c:...) by 0x........: main (tc21_pthonce.c:86) -Possible data race during write of size 4 at 0x........ +Possible data race during read of size 4 at 0x........ by thread #3 + at 0x........: child (tc21_pthonce.c:74) + by 0x........: mythread_wrapper (hg_intercepts.c:...) + by 0x........: ... + by 0x........: ... + This conflicts with a previous access by thread #2 at 0x........: child (tc21_pthonce.c:74) by 0x........: mythread_wrapper (hg_intercepts.c:...) by 0x........: ... by 0x........: ... - Old state: shared-readonly by threads #2, #3 - New state: shared-modified by threads #2, #3 - Reason: this thread, #3, holds no consistent locks - Location 0x........ has never been protected by any lock - Location 0x........ is 0 bytes inside local var "unprotected2" - declared at tc21_pthonce.c:51, in frame #0 of thread 2 + Location 0x........ is 0 bytes inside local var "unprotected2" + declared at tc21_pthonce.c:51, in frame #0 of thread 2 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)