|
From: <sv...@va...> - 2007-09-10 21:27:24
|
Author: sewardj
Date: 2007-09-10 22:27:20 +0100 (Mon, 10 Sep 2007)
New Revision: 6815
Log:
Add some moderately-plausible correct outputs.
Modified:
branches/THRCHECK/thrcheck/tests/hg01_all_ok.stderr.exp
branches/THRCHECK/thrcheck/tests/hg02_deadlock.stderr.exp
branches/THRCHECK/thrcheck/tests/hg03_inherit.c
branches/THRCHECK/thrcheck/tests/hg03_inherit.stderr.exp
branches/THRCHECK/thrcheck/tests/hg04_race.stderr.exp
branches/THRCHECK/thrcheck/tests/hg05_race2.stderr.exp
branches/THRCHECK/thrcheck/tests/hg06_readshared.stderr.exp
branches/THRCHECK/thrcheck/tests/tc01_simple_race.stderr.exp
branches/THRCHECK/thrcheck/tests/tc02_simple_tls.stderr.exp
branches/THRCHECK/thrcheck/tests/tc03_re_excl.c
branches/THRCHECK/thrcheck/tests/tc03_re_excl.stderr.exp
branches/THRCHECK/thrcheck/tests/tc04_free_lock.stderr.exp
branches/THRCHECK/thrcheck/tests/tc05_simple_race.stderr.exp
branches/THRCHECK/thrcheck/tests/tc06_two_races.stderr.exp
branches/THRCHECK/thrcheck/tests/tc07_hbl1.stderr.exp
branches/THRCHECK/thrcheck/tests/tc07_hbl1.stdout.exp
branches/THRCHECK/thrcheck/tests/tc08_hbl2.stderr.exp
branches/THRCHECK/thrcheck/tests/tc08_hbl2.stdout.exp
branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.stderr.exp
branches/THRCHECK/thrcheck/tests/tc10_rec_lock.stderr.exp
Modified: branches/THRCHECK/thrcheck/tests/hg01_all_ok.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg01_all_ok.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/hg01_all_ok.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/hg02_deadlock.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg02_deadlock.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/hg02_deadlock.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/hg03_inherit.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg03_inherit.c 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/hg03_inherit.c 2007-09-10 21:27:20 UTC (rev 6815)
@@ -1,11 +1,10 @@
+
+/* I don't think this is a very good test .. all this
+ sleepery is highly confusing. */
+
/* test child thread inheriting data */
-// ***
-//
-// Helgrind should detect an error on line 48 for this test, but it doesn't!
-//
-// ***
-
+#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
@@ -14,6 +13,7 @@
static void *t1(void *v)
{
volatile int *ip = (int *)v;
+ if (0) printf("ta W\n");
*ip += 44;
*ip *= 2;
sleep(1);
@@ -23,13 +23,15 @@
static void *t2(void *v)
{
volatile int *ip = (int *)v;
+ sleep(2);
+ if (0) printf("tb W\n");
*ip += 88;
*ip *= 3;
- sleep(2);
+ sleep(1);
return 0;
}
-int main()
+int main(void)
{
pthread_t a, b;
volatile int ret = 0;
@@ -39,12 +41,22 @@
shared[0] = 22;
shared[1] = 77;
- pthread_create(&a, NULL, t1, (void *)&shared[0]);
+ pthread_create(&a, NULL, t1, (void *)&shared[0]);
+ // a steals shared[0] from root thread, so is excl(a)
pthread_create(&b, NULL, t2, (void *)&shared[1]);
+ // b steals shared[1] from root thread, so is excl(b)
pthread_join(a, NULL);
+ // b's stuff (shared[1]) still belongs to b, so is excl(b)
+ // ret is excl(root), and shared[0] is re-acquired as excl(root)
+ // since a joined to root
+ if (0) printf("r R1\n");
ret += shared[0]; /* no error - a is finished */
+
+ // but shared[1] is excl(b); hence we're reading excl(b)
+ // without a lock and without a dependency edge
+ if (0) printf("r R2\n");
ret += shared[1]; /* expect error - b has not finished,
so we can't touch shared[1] yet */
Modified: branches/THRCHECK/thrcheck/tests/hg03_inherit.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg03_inherit.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/hg03_inherit.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,22 @@
+
+Thread 3:
+Thread #1 is the program's root thread
+
+Thread #3 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: main (hg03_inherit.c:46)
+
+Possible data race during write to 0x........
+ at 0x........: t2 (hg03_inherit.c:28)
+ by 0x........: mythread_wrapper (tc_intercepts.c:164)
+ 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
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/hg04_race.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg04_race.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/hg04_race.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,27 @@
+
+Thread 2:
+Thread #2 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: main (hg04_race.c:19)
+
+Thread #3 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: main (hg04_race.c:21)
+
+Possible data race during write to 0x........
+ at 0x........: th (hg04_race.c:10)
+ by 0x........: mythread_wrapper (tc_intercepts.c:164)
+ 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
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/hg05_race2.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg05_race2.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/hg05_race2.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,27 @@
+
+Thread 2:
+Thread #2 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: main (hg05_race2.c:27)
+
+Thread #3 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: main (hg05_race2.c:29)
+
+Possible data race during write to 0x........
+ at 0x........: th (hg05_race2.c:17)
+ by 0x........: mythread_wrapper (tc_intercepts.c:164)
+ 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
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/hg06_readshared.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg06_readshared.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/hg06_readshared.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/tc01_simple_race.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc01_simple_race.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc01_simple_race.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,18 @@
+
+Thread #1 is the program's root thread
+
+Thread #2 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: main (tc01_simple_race.c:22)
+
+Possible data race during write to 0x........
+ 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
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/tc02_simple_tls.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc02_simple_tls.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc02_simple_tls.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/tc03_re_excl.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc03_re_excl.c 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc03_re_excl.c 2007-09-10 21:27:20 UTC (rev 6815)
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
-/* Simple test program, no race: parent only modified x after child
+/* Simple test program, no race: parent only modifies x after child
has modified it and then joined with the parent. Tests simple
thread lifetime segment handling. */
@@ -23,11 +23,11 @@
int main ( void )
{
pthread_t thread_id;
- int* x = malloc(10 * sizeof(int));
- x[5] = 0;
+ volatile int* x = malloc(10 * sizeof(int));
+ x[5] = 1;
/* x[5] is Excl(parent) */
- pthread_create(&thread_id, 0, worker_thread, x);
+ pthread_create(&thread_id, 0, worker_thread, (void*)x);
use(x[5]); /* read access */
@@ -38,8 +38,7 @@
and child has merged to parent. So now it's ok for parent to
access it without locking. */
- x[5] = 99; /* write access */
+ x[5] = 0; /* write access */
- free(x);
- return 0;
+ return x[5];
}
Modified: branches/THRCHECK/thrcheck/tests/tc03_re_excl.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc03_re_excl.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc03_re_excl.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/tc04_free_lock.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc04_free_lock.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc04_free_lock.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,35 @@
+
+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 (tc_intercepts.c:299)
+ by 0x........: main (tc04_free_lock.c:20)
+
+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 (tc_intercepts.c:361)
+ 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 (tc_intercepts.c:299)
+ 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 (tc_intercepts.c:361)
+ 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)
Modified: branches/THRCHECK/thrcheck/tests/tc05_simple_race.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc05_simple_race.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc05_simple_race.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,18 @@
+
+Thread #1 is the program's root thread
+
+Thread #2 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: main (tc05_simple_race.c:27)
+
+Possible data race during write to 0x........
+ 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
+
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/tc06_two_races.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc06_two_races.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc06_two_races.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,25 @@
+
+Thread #1 is the program's root thread
+
+Thread #2 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: main (tc06_two_races.c:26)
+
+Possible data race during write to 0x........
+ 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
+
+Possible data race during write to 0x........
+ 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
+
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/tc07_hbl1.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc07_hbl1.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc07_hbl1.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/tc07_hbl1.stdout.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc07_hbl1.stdout.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc07_hbl1.stdout.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1 @@
+x = 2
Modified: branches/THRCHECK/thrcheck/tests/tc08_hbl2.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc08_hbl2.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc08_hbl2.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,3 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/tc08_hbl2.stdout.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc08_hbl2.stdout.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc08_hbl2.stdout.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,10 @@
+child: new value 1
+child: new value 2
+child: new value 3
+child: new value 4
+child: new value 5
+child: new value 6
+child: new value 7
+child: new value 8
+child: new value 9
+child: new value 10
Modified: branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,100 @@
+
+Thread #1 is the program's root thread
+
+Thread #1 unlocked a not-locked lock at 0x........
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:423)
+ by 0x........: nearly_main (tc09_bad_unlock.c:27)
+ by 0x........: main (tc09_bad_unlock.c:49)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (tc_intercepts.c:299)
+ by 0x........: nearly_main (tc09_bad_unlock.c:23)
+ by 0x........: main (tc09_bad_unlock.c:49)
+
+Thread 2:
+Thread #2 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: nearly_main (tc09_bad_unlock.c:35)
+ by 0x........: main (tc09_bad_unlock.c:49)
+
+Thread #2 unlocked lock at 0x........ currently held by thread #1
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:423)
+ by 0x........: child_fn (tc09_bad_unlock.c:11)
+ by 0x........: mythread_wrapper (tc_intercepts.c:164)
+ by 0x........: ...
+ by 0x........: ...
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (tc_intercepts.c:299)
+ by 0x........: nearly_main (tc09_bad_unlock.c:31)
+ by 0x........: main (tc09_bad_unlock.c:49)
+
+Thread 1:
+Thread #1 unlocked an invalid lock at 0x........
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:423)
+ by 0x........: nearly_main (tc09_bad_unlock.c:41)
+ by 0x........: main (tc09_bad_unlock.c:49)
+
+Thread #1's call to pthread_mutex_unlock failed with error 22 (EINVAL: Invalid argument)
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:432)
+ by 0x........: nearly_main (tc09_bad_unlock.c:41)
+ by 0x........: main (tc09_bad_unlock.c:49)
+
+Thread #1 deallocated location 0x........ containing a locked lock
+ at 0x........: nearly_main (tc09_bad_unlock.c:45)
+ by 0x........: main (tc09_bad_unlock.c:49)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (tc_intercepts.c:299)
+ by 0x........: nearly_main (tc09_bad_unlock.c:31)
+ by 0x........: main (tc09_bad_unlock.c:49)
+
+Thread #1 unlocked a not-locked lock at 0x........
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:423)
+ by 0x........: nearly_main (tc09_bad_unlock.c:27)
+ by 0x........: main (tc09_bad_unlock.c:50)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (tc_intercepts.c:299)
+ by 0x........: nearly_main (tc09_bad_unlock.c:23)
+ by 0x........: main (tc09_bad_unlock.c:50)
+
+Thread 2:
+Thread #3 was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: ...
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.5.so)
+ by 0x........: pthread_create@* (tc_intercepts.c:184)
+ by 0x........: nearly_main (tc09_bad_unlock.c:35)
+ by 0x........: main (tc09_bad_unlock.c:50)
+
+Thread #3 unlocked lock at 0x........ currently held by thread #1
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:423)
+ by 0x........: child_fn (tc09_bad_unlock.c:11)
+ by 0x........: mythread_wrapper (tc_intercepts.c:164)
+ by 0x........: ...
+ by 0x........: ...
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (tc_intercepts.c:299)
+ by 0x........: nearly_main (tc09_bad_unlock.c:31)
+ by 0x........: main (tc09_bad_unlock.c:50)
+
+Thread 1:
+Thread #1 unlocked an invalid lock at 0x........
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:423)
+ by 0x........: nearly_main (tc09_bad_unlock.c:41)
+ by 0x........: main (tc09_bad_unlock.c:50)
+
+Thread #1's call to pthread_mutex_unlock failed with error 22 (EINVAL: Invalid argument)
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:432)
+ by 0x........: nearly_main (tc09_bad_unlock.c:41)
+ by 0x........: main (tc09_bad_unlock.c:50)
+
+Thread #1 deallocated location 0x........ containing a locked lock
+ at 0x........: nearly_main (tc09_bad_unlock.c:45)
+ by 0x........: main (tc09_bad_unlock.c:50)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (tc_intercepts.c:299)
+ by 0x........: nearly_main (tc09_bad_unlock.c:31)
+ by 0x........: main (tc09_bad_unlock.c:50)
+
+ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
Modified: branches/THRCHECK/thrcheck/tests/tc10_rec_lock.stderr.exp
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc10_rec_lock.stderr.exp 2007-09-10 16:52:09 UTC (rev 6814)
+++ branches/THRCHECK/thrcheck/tests/tc10_rec_lock.stderr.exp 2007-09-10 21:27:20 UTC (rev 6815)
@@ -0,0 +1,25 @@
+
+before lock #1
+before lock #2
+before lock #3
+before unlock #1
+before unlock #2
+before unlock #3
+before unlock #4
+Thread #1 is the program's root thread
+
+Thread #1 unlocked a not-locked lock at 0x........
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:423)
+ by 0x........: nearly_main (tc10_rec_lock.c:39)
+ by 0x........: main (tc10_rec_lock.c:44)
+ Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (tc_intercepts.c:299)
+ by 0x........: nearly_main (tc10_rec_lock.c:21)
+ by 0x........: main (tc10_rec_lock.c:44)
+
+Thread #1's call to pthread_mutex_unlock failed with error 1 (EPERM: Operation not permitted)
+ at 0x........: pthread_mutex_unlock (tc_intercepts.c:432)
+ by 0x........: nearly_main (tc10_rec_lock.c:39)
+ by 0x........: main (tc10_rec_lock.c:44)
+
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
|