]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Update baseline expected outputs, now that Helgrind uses a different
authorJulian Seward <jseward@acm.org>
Sun, 9 Nov 2008 20:47:57 +0000 (20:47 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 9 Nov 2008 20:47:57 +0000 (20:47 +0000)
algorithm than in 3.3.x.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8750

13 files changed:
helgrind/libhb_core.c
helgrind/tests/hg03_inherit.stderr.exp-glibc25-amd64
helgrind/tests/hg04_race.stderr.exp-glibc25-amd64
helgrind/tests/hg05_race2.stderr.exp-glibc25-amd64
helgrind/tests/tc01_simple_race.stderr.exp-glibc25-amd64
helgrind/tests/tc04_free_lock.stderr.exp-glibc25-amd64
helgrind/tests/tc05_simple_race.stderr.exp-glibc25-amd64
helgrind/tests/tc06_two_races.c
helgrind/tests/tc06_two_races.stderr.exp-glibc25-amd64
helgrind/tests/tc16_byterace.c
helgrind/tests/tc16_byterace.stderr.exp-glibc25-amd64
helgrind/tests/tc17_sembar.c
helgrind/tests/tc21_pthonce.stderr.exp-glibc25-amd64

index 82159ba39e22f857dcef366476ad3d3168d24b43..3261f253216be7a0fe8203162f4e5430f3b35043 100644 (file)
@@ -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)("<<GC ends, next gc at %ld>>\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);
    }
 }
index 46c6e535822316dc1417a2d82ec7e975f75e1f9c..117205b8f1c16fc1ac23dd3788cff3250795bf85 100644 (file)
@@ -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)
index 75afd8be68464e5cefdcfb8ca9b3fed74bbb2c17..5aabafa7b5541103985505cac57811b9914e9bf2 100644 (file)
@@ -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)
index 81bbbaad1345ba540678025e164d058ae2b7f9d7..6797e8805b827483c5315862a4ca334fce44bb10 100644 (file)
@@ -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)
index 47265d21be3b5efc7465c78698cbad8f26bedaf6..75fcec0136fc52033f0eb6ff0d563a5638653676 100644 (file)
@@ -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)
index b14e3b64c4bc4cb56833485b1d06073402aa6a54..8a4ba6d57632fe97698e1977eaf63f55fe0422d9 100644 (file)
@@ -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)
index 50ecb4af2ff7c891b28a62bb692e449a710f0274..cc62199edac00d233f53473d1b94c6837d7f7f74 100644 (file)
@@ -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)
index 65c83efcc91c3fc6090e0e204cc4eed7dc8599ee..4eaf9dda017464e7b604ada583422d83feb31c4b 100644 (file)
@@ -4,7 +4,7 @@
 #include <stdlib.h>
 
 /* 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;
index e95ae9ad73c35ee2cd14b08b3d33ed40a08eb3de..a750f115010a6b2daaa67eec1a10d3f26e612aa0 100644 (file)
@@ -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)
index 1916c37fbd322aa707d2fd1f8dc8f2e9f4b833c1..70a9101a6e3d6a808b09a20cd697dd248a58a548 100644 (file)
@@ -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");
index 74255e3e830e412842c8bebefb5ae02507c77733..d71f603a498310e1b22b3a0d52c1fcd12f22d770 100644 (file)
@@ -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)
index ed3f4ca41fb053cd993d8b9e1625f32701120a9b..cc91f5e0b1b0513a7831c5294a7bd7472f5807f3 100644 (file)
@@ -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
index 2bb2de0aa2953b6f04a6be914c8d6adfc4a9aa80..69ce61da167535581d861c3d60eb26200199557c 100644 (file)
@@ -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)