|
From: <sv...@va...> - 2008-11-14 19:43:50
|
Author: sewardj
Date: 2008-11-14 19:43:44 +0000 (Fri, 14 Nov 2008)
New Revision: 8768
Log:
Add some regression tests for pthread_barrier handling.
Added:
trunk/helgrind/tests/bar_bad.c
trunk/helgrind/tests/bar_bad.stderr.exp-glibc28-amd64
trunk/helgrind/tests/bar_bad.stdout.exp
trunk/helgrind/tests/bar_bad.vgtest
trunk/helgrind/tests/bar_trivial.c
trunk/helgrind/tests/bar_trivial.stderr.exp-glibc28-amd64
trunk/helgrind/tests/bar_trivial.stdout.exp
trunk/helgrind/tests/bar_trivial.vgtest
trunk/helgrind/tests/filter_threadnums
trunk/helgrind/tests/pth_barrier1.stderr.exp-glibc28-amd64
trunk/helgrind/tests/pth_barrier1.stdout.exp
trunk/helgrind/tests/pth_barrier1.vgtest
trunk/helgrind/tests/pth_barrier2.stderr.exp-glibc28-amd64
trunk/helgrind/tests/pth_barrier2.stdout.exp
trunk/helgrind/tests/pth_barrier2.vgtest
trunk/helgrind/tests/pth_barrier3.stderr.exp-glibc28-amd64
trunk/helgrind/tests/pth_barrier3.stdout.exp
trunk/helgrind/tests/pth_barrier3.vgtest
Modified:
trunk/helgrind/tests/Makefile.am
Modified: trunk/helgrind/tests/Makefile.am
===================================================================
--- trunk/helgrind/tests/Makefile.am 2008-11-14 19:41:19 UTC (rev 8767)
+++ trunk/helgrind/tests/Makefile.am 2008-11-14 19:43:44 UTC (rev 8768)
@@ -2,9 +2,13 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
-noinst_SCRIPTS = filter_stderr
+noinst_SCRIPTS = filter_stderr filter_threadnums
EXTRA_DIST = $(noinst_SCRIPTS) \
+ bar_bad.vgtest bar_bad.stdout.exp \
+ bar_bad.stderr.exp-glibc28-amd64 \
+ bar_trivial.vgtest bar_trivial.stdout.exp \
+ bar_trivial.stderr.exp-glibc28-amd64 \
hg01_all_ok.vgtest hg01_all_ok.stdout.exp \
hg01_all_ok.stderr.exp-glibc25-amd64 \
hg02_deadlock.vgtest hg02_deadlock.stdout.exp \
@@ -21,6 +25,12 @@
hg05_race2.stderr.exp-glibc25-x86 \
hg06_readshared.vgtest hg06_readshared.stdout.exp \
hg06_readshared.stderr.exp-glibc25-amd64 \
+ pth_barrier1.vgtest pth_barrier1.stdout.exp \
+ pth_barrier1.stderr.exp-glibc28-amd64 \
+ pth_barrier2.vgtest pth_barrier2.stdout.exp \
+ pth_barrier2.stderr.exp-glibc28-amd64 \
+ pth_barrier3.vgtest pth_barrier3.stdout.exp \
+ pth_barrier3.stderr.exp-glibc28-amd64 \
rwlock_race.vgtest rwlock_race.stdout.exp \
rwlock_race.stderr.exp-glibc25-amd64 \
rwlock_test.vgtest rwlock_test.stdout.exp \
@@ -93,12 +103,15 @@
tc24_nonzero_sem.stderr.exp-glibc25-amd64
check_PROGRAMS = \
+ bar_bad \
+ bar_trivial \
hg01_all_ok \
hg02_deadlock \
hg03_inherit \
hg04_race \
hg05_race2 \
hg06_readshared \
+ pth_barrier \
rwlock_race \
rwlock_test \
tc01_simple_race \
@@ -135,5 +148,6 @@
LDADD = -lpthread
# only needed because of referencing sources in drd/tests
+pth_barrier_SOURCES = ../../drd/tests/pth_barrier.c
rwlock_race_SOURCES = ../../drd/tests/rwlock_race.c
rwlock_test_SOURCES = ../../drd/tests/rwlock_test.c
Added: trunk/helgrind/tests/bar_bad.c
===================================================================
--- trunk/helgrind/tests/bar_bad.c (rev 0)
+++ trunk/helgrind/tests/bar_bad.c 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,89 @@
+
+/* This program checks that Helgrind reports the five degenerate
+ uses of the barrier functions shown. */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <unistd.h>
+#include <string.h>
+
+void* child1 ( void* arg )
+{
+ pthread_barrier_wait( (pthread_barrier_t*)arg );
+ return NULL;
+}
+
+int main ( void )
+{
+ pthread_barrier_t *bar1, *bar2, *bar3, *bar4, *bar5;
+ pthread_t thr1, thr2;
+ int r;
+
+ /* possibly set up a watchdog timer thread here. */
+
+
+
+
+
+
+
+
+
+
+
+ /* initialise a barrier with a zero count */
+ fprintf(stderr, "\ninitialise a barrier with zero count\n");
+ bar1 = malloc(sizeof(pthread_barrier_t));
+ pthread_barrier_init(bar1, NULL, 0);
+
+ /* initialise a barrier twice */
+ fprintf(stderr, "\ninitialise a barrier twice\n");
+ bar2 = malloc(sizeof(pthread_barrier_t));
+ pthread_barrier_init(bar2, NULL, 1);
+ pthread_barrier_init(bar2, NULL, 1);
+
+ /* initialise a barrier which has threads waiting on it.
+ This isn't too simple. */
+ fprintf(stderr, "\ninitialise a barrier which has threads waiting on it\n");
+ bar3 = malloc(sizeof(pthread_barrier_t));
+ pthread_barrier_init(bar3, NULL, 2);
+ /* create a thread, whose only purpose is to block on the barrier */
+ pthread_create(&thr1, NULL, child1, (void*)bar3);
+ /* guarantee that it gets there first */
+ sleep(1);
+ /* and now reinitialise */
+ pthread_barrier_init(bar3, NULL, 3);
+
+ /* destroy a barrier that has threads waiting at it */
+ fprintf(stderr, "\ndestroy a barrier that has waiting threads\n");
+ /* once again, create a thread, whose only purpose is to block. */
+ bar4 = malloc(sizeof(pthread_barrier_t));
+ pthread_barrier_init(bar4, NULL, 2);
+ /* create a thread, whose only purpose is to block on the barrier */
+ pthread_create(&thr2, NULL, child1, (void*)bar4);
+ /* guarantee that it gets there first */
+ sleep(1);
+ /* and now destroy */
+ pthread_barrier_destroy(bar4);
+
+ /* destroy a barrier that was never initialised. This is a bit
+ tricky, in that we have to fill the barrier with bytes which
+ ensure that the pthread_barrier_destroy call doesn't hang for
+ some reason. Zero-fill seems to work ok on amd64-linux (glibc
+ 2.8). */
+ fprintf(stderr, "\ndestroy a barrier that was never initialised\n");
+ bar5 = malloc(sizeof(pthread_barrier_t));
+ assert(bar5);
+ memset(bar5, 0, sizeof(*bar5));
+ pthread_barrier_destroy(bar5);
+
+ /* now we need to clean up the mess .. */
+ r= pthread_cancel(thr1); assert(!r);
+ r= pthread_cancel(thr2); assert(!r);
+
+ free(bar1); free(bar2); free(bar3); free(bar4); free(bar5);
+
+ return 0;
+}
Added: trunk/helgrind/tests/bar_bad.stderr.exp-glibc28-amd64
===================================================================
--- trunk/helgrind/tests/bar_bad.stderr.exp-glibc28-amd64 (rev 0)
+++ trunk/helgrind/tests/bar_bad.stderr.exp-glibc28-amd64 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,45 @@
+
+initialise a barrier with zero count
+Thread #1 is the program's root thread
+
+Thread #1: pthread_barrier_init: 'count' argument is zero
+ at 0x........: pthread_barrier_init (hg_intercepts.c:...)
+ by 0x........: main (bar_bad.c:39)
+
+Thread #1's call to pthread_barrier_init failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: pthread_barrier_init (hg_intercepts.c:...)
+ by 0x........: main (bar_bad.c:39)
+
+initialise a barrier twice
+
+Thread #1: pthread_barrier_init: barrier is already initialised
+ at 0x........: pthread_barrier_init (hg_intercepts.c:...)
+ by 0x........: main (bar_bad.c:45)
+
+initialise a barrier which has threads waiting on it
+
+Thread #1: pthread_barrier_init: barrier is already initialised
+ at 0x........: pthread_barrier_init (hg_intercepts.c:...)
+ by 0x........: main (bar_bad.c:57)
+
+Thread #1: pthread_barrier_init: threads are waiting at barrier
+ at 0x........: pthread_barrier_init (hg_intercepts.c:...)
+ by 0x........: main (bar_bad.c:57)
+
+destroy a barrier that has waiting threads
+
+Thread #1: pthread_barrier_destroy: threads are waiting at barrier
+ at 0x........: pthread_barrier_destroy (hg_intercepts.c:...)
+ by 0x........: main (bar_bad.c:69)
+
+Thread #1's call to pthread_barrier_destroy failed
+ with error code 16 (EBUSY: Device or resource busy)
+ at 0x........: pthread_barrier_destroy (hg_intercepts.c:...)
+ by 0x........: main (bar_bad.c:69)
+
+destroy a barrier that was never initialised
+
+Thread #1: pthread_barrier_destroy: barrier was never initialised
+ at 0x........: pthread_barrier_destroy (hg_intercepts.c:...)
+ by 0x........: main (bar_bad.c:80)
Added: trunk/helgrind/tests/bar_bad.stdout.exp
===================================================================
Added: trunk/helgrind/tests/bar_bad.vgtest
===================================================================
--- trunk/helgrind/tests/bar_bad.vgtest (rev 0)
+++ trunk/helgrind/tests/bar_bad.vgtest 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,2 @@
+prog: bar_bad
+vgopts: -q
Added: trunk/helgrind/tests/bar_trivial.c
===================================================================
--- trunk/helgrind/tests/bar_trivial.c (rev 0)
+++ trunk/helgrind/tests/bar_trivial.c 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,57 @@
+
+/* This is the most trivial test I could think of that involves
+ barriers. If H fails to notice the pthread_barrier_wait call then
+ it will report a race. Correct behaviour is not to report a race
+ (there isn't one.) */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <unistd.h>
+
+int x = 0;
+
+pthread_barrier_t bar;
+
+void* child_fn ( void* arg )
+{
+ long r, n = (long)arg;
+
+ if (n == 1) x++;
+
+ r = pthread_barrier_wait(&bar);
+ assert(r == 0 || r == PTHREAD_BARRIER_SERIAL_THREAD);
+
+ if (n == 0) x++;
+
+ sleep(1); /* ensure both threads get to this point before
+ either exits. */
+ return NULL;
+}
+
+#define NTHR 2
+
+int main ( void )
+{
+ long i, r;
+ pthread_t thr[NTHR];
+
+ r = pthread_barrier_init(&bar, NULL, NTHR);
+ assert(!r);
+
+ for (i = 0; i < NTHR; i++) {
+ r = pthread_create(&thr[i], NULL, child_fn, (void*)i);
+ assert(!r);
+ }
+
+ for (i = 0; i < NTHR; i++) {
+ r = pthread_join(thr[i], NULL);
+ assert(!r);
+ }
+
+ r = pthread_barrier_destroy(&bar); assert(!r);
+
+ printf("x = %d\n", x);
+ return 0;
+}
Added: trunk/helgrind/tests/bar_trivial.stderr.exp-glibc28-amd64
===================================================================
Added: trunk/helgrind/tests/bar_trivial.stdout.exp
===================================================================
--- trunk/helgrind/tests/bar_trivial.stdout.exp (rev 0)
+++ trunk/helgrind/tests/bar_trivial.stdout.exp 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1 @@
+x = 2
Added: trunk/helgrind/tests/bar_trivial.vgtest
===================================================================
--- trunk/helgrind/tests/bar_trivial.vgtest (rev 0)
+++ trunk/helgrind/tests/bar_trivial.vgtest 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,2 @@
+prog: bar_trivial
+vgopts: -q
Added: trunk/helgrind/tests/filter_threadnums
===================================================================
--- trunk/helgrind/tests/filter_threadnums (rev 0)
+++ trunk/helgrind/tests/filter_threadnums 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+./filter_stderr |
+
+# get rid of the numbers in bits of text "Thread #n" and "thread #n"
+# as these make some tests more scheduling sensitive -- those where
+# there are multiple threads which play interchangeable roles.
+
+sed "s/hread #[0-9]*/hread #x/"
Property changes on: trunk/helgrind/tests/filter_threadnums
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/helgrind/tests/pth_barrier1.stderr.exp-glibc28-amd64
===================================================================
--- trunk/helgrind/tests/pth_barrier1.stderr.exp-glibc28-amd64 (rev 0)
+++ trunk/helgrind/tests/pth_barrier1.stderr.exp-glibc28-amd64 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,26 @@
+Thread #x 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........: barriers_and_races (pth_barrier.c:84)
+ by 0x........: main (pth_barrier.c:107)
+
+Thread #x 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........: barriers_and_races (pth_barrier.c:84)
+ by 0x........: main (pth_barrier.c:107)
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
Added: trunk/helgrind/tests/pth_barrier1.stdout.exp
===================================================================
Added: trunk/helgrind/tests/pth_barrier1.vgtest
===================================================================
--- trunk/helgrind/tests/pth_barrier1.vgtest (rev 0)
+++ trunk/helgrind/tests/pth_barrier1.vgtest 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,4 @@
+prog: pth_barrier
+args: 2 1 1
+vgopts: -q
+stderr_filter: ./filter_threadnums
Added: trunk/helgrind/tests/pth_barrier2.stderr.exp-glibc28-amd64
===================================================================
--- trunk/helgrind/tests/pth_barrier2.stderr.exp-glibc28-amd64 (rev 0)
+++ trunk/helgrind/tests/pth_barrier2.stderr.exp-glibc28-amd64 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,367 @@
+Thread #x 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........: barriers_and_races (pth_barrier.c:84)
+ by 0x........: main (pth_barrier.c:107)
+
+Thread #x 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........: barriers_and_races (pth_barrier.c:84)
+ by 0x........: main (pth_barrier.c:107)
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
Added: trunk/helgrind/tests/pth_barrier2.stdout.exp
===================================================================
Added: trunk/helgrind/tests/pth_barrier2.vgtest
===================================================================
--- trunk/helgrind/tests/pth_barrier2.vgtest (rev 0)
+++ trunk/helgrind/tests/pth_barrier2.vgtest 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,4 @@
+prog: pth_barrier
+args: 2 32 1
+vgopts: -q --cmp-race-err-addrs=yes
+stderr_filter: ./filter_threadnums
Added: trunk/helgrind/tests/pth_barrier3.stderr.exp-glibc28-amd64
===================================================================
--- trunk/helgrind/tests/pth_barrier3.stderr.exp-glibc28-amd64 (rev 0)
+++ trunk/helgrind/tests/pth_barrier3.stderr.exp-glibc28-amd64 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,26 @@
+Thread #x 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........: barriers_and_races (pth_barrier.c:84)
+ by 0x........: main (pth_barrier.c:107)
+
+Thread #x 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........: barriers_and_races (pth_barrier.c:84)
+ by 0x........: main (pth_barrier.c:107)
+
+Possible data race during write of size 4 at 0x........ by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
+ This conflicts with a previous access by thread #x
+ at 0x........: threadfunc (pth_barrier.c:57)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ by 0x........: ...
+ by 0x........: ...
Added: trunk/helgrind/tests/pth_barrier3.stdout.exp
===================================================================
Added: trunk/helgrind/tests/pth_barrier3.vgtest
===================================================================
--- trunk/helgrind/tests/pth_barrier3.vgtest (rev 0)
+++ trunk/helgrind/tests/pth_barrier3.vgtest 2008-11-14 19:43:44 UTC (rev 8768)
@@ -0,0 +1,4 @@
+prog: pth_barrier
+args: 32 1 1
+vgopts: -q
+stderr_filter: ./filter_threadnums
|