You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(12) |
|
2
(6) |
3
(13) |
4
(9) |
5
(6) |
6
(8) |
7
(5) |
8
(5) |
|
9
(15) |
10
(18) |
11
(18) |
12
(18) |
13
(7) |
14
(11) |
15
(6) |
|
16
(12) |
17
(28) |
18
(15) |
19
(12) |
20
(17) |
21
(23) |
22
(10) |
|
23
(9) |
24
(11) |
25
(7) |
26
(21) |
27
(12) |
28
(6) |
29
(6) |
|
30
(8) |
|
|
|
|
|
|
|
From: <sv...@va...> - 2007-09-10 21:35:50
|
Author: sewardj Date: 2007-09-10 22:35:49 +0100 (Mon, 10 Sep 2007) New Revision: 6817 Log: Oops. Needed. Added: branches/THRCHECK/thrcheck/tests/filter_stderr Added: branches/THRCHECK/thrcheck/tests/filter_stderr =================================================================== --- branches/THRCHECK/thrcheck/tests/filter_stderr (rev 0) +++ branches/THRCHECK/thrcheck/tests/filter_stderr 2007-09-10 21:35:49 UTC (rev 6817) @@ -0,0 +1,16 @@ +#! /bin/sh + +dir=`dirname $0` + +$dir/../../tests/filter_stderr_basic | + +# Anonymise addresses +$dir/../../tests/filter_addresses | + +# Remove "Thrcheck, ..." line and the following copyright line. +sed "/^Thrcheck, a thread error detector/ , /./ d" | + +# Anonymise line numbers in mc_replace_strmem.c +sed "s/mc_replace_strmem.c:[0-9]*/mc_replace_strmem.c:.../" | + +$dir/../../tests/filter_test_paths Property changes on: branches/THRCHECK/thrcheck/tests/filter_stderr ___________________________________________________________________ Name: svn:executable + * |
|
From: <sv...@va...> - 2007-09-10 21:28:28
|
Author: sewardj
Date: 2007-09-10 22:28:26 +0100 (Mon, 10 Sep 2007)
New Revision: 6816
Log:
Add a suppression needed for running the regtests.
Modified:
branches/THRCHECK/glibc-2.5.supp
Modified: branches/THRCHECK/glibc-2.5.supp
===================================================================
--- branches/THRCHECK/glibc-2.5.supp 2007-09-10 21:27:20 UTC (rev 6815)
+++ branches/THRCHECK/glibc-2.5.supp 2007-09-10 21:28:26 UTC (rev 6816)
@@ -313,6 +313,13 @@
fun:pthread_create@@GLIBC_*
fun:pthread_create@*
}
+{
+ thrcheck-wrappers-glibc-create-2
+ Thrcheck:Race
+ fun:do_clone
+ fun:pthread_create@@GLIBC_*
+ fun:pthread_create@*
+}
# This is very ugly. It is needed to suppress errors inside
# NPTL's pthread_cond_signal. Why only one stack frame --
|
|
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)
|
|
From: <sv...@va...> - 2007-09-10 16:52:07
|
Author: sewardj
Date: 2007-09-10 17:52:09 +0100 (Mon, 10 Sep 2007)
New Revision: 6814
Log:
ppc64-linux equivalent to r6813 (use sigframe return stub in
m_trampoline, not on the stack)
Modified:
trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c
trunk/coregrind/m_trampoline.S
trunk/coregrind/pub_core_trampoline.h
Modified: trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c 2007-09-10 16:28:38 UTC (rev 6813)
+++ trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c 2007-09-10 16:52:09 UTC (rev 6814)
@@ -260,8 +260,16 @@
/* XXX should do FP and vector regs */
/* set up signal return trampoline */
- frame->tramp[0] = 0x38000000U + __NR_rt_sigreturn; /* li 0,__NR_rt_sigreturn */
- frame->tramp[1] = 0x44000002U; /* sc */
+ /* NB. 5 Sept 07. mc->mc_pad[0..1] used to contain a the code to
+ which the signal handler returns, and it just did sys_sigreturn
+ or sys_rt_sigreturn. But this doesn't work if the stack is
+ non-executable, and it isn't consistent with the x86-linux and
+ amd64-linux scheme for removing the stack frame. So instead be
+ consistent and use a stub in m_trampoline. Then it doesn't
+ matter whether or not the (guest) stack is executable. This
+ fixes #149519 and #145837. */
+ frame->tramp[0] = 0; /* invalid */
+ frame->tramp[1] = 0; /* invalid */
VG_TRACK(post_mem_write, Vg_CoreSignal, tst->tid,
(Addr)&frame->tramp, sizeof(frame->tramp));
@@ -270,7 +278,7 @@
sizeof(frame->tramp), "stack_mcontext" );
/* set the signal handler to return to the trampoline */
- SET_SIGNAL_LR(tst, (Addr) &frame->tramp[0]);
+ SET_SIGNAL_LR(tst, (Addr)&VG_(ppc64_linux_SUBST_FOR_rt_sigreturn));
/* Stack pointer for the handler .. (note, back chain set
earlier) */
Modified: trunk/coregrind/m_trampoline.S
===================================================================
--- trunk/coregrind/m_trampoline.S 2007-09-10 16:28:38 UTC (rev 6813)
+++ trunk/coregrind/m_trampoline.S 2007-09-10 16:52:09 UTC (rev 6814)
@@ -365,6 +365,12 @@
.global VG_(trampoline_stuff_start)
VG_(trampoline_stuff_start):
+.global VG_(ppc64_linux_SUBST_FOR_rt_sigreturn)
+VG_(ppc64_linux_SUBST_FOR_rt_sigreturn):
+ li 0,__NR_rt_sigreturn
+ sc
+ .long 0 /*illegal insn*/
+
/* See comment in pub_core_trampoline.h for what this is for */
.global VG_(ppctoc_magic_redirect_return_stub)
VG_(ppctoc_magic_redirect_return_stub):
Modified: trunk/coregrind/pub_core_trampoline.h
===================================================================
--- trunk/coregrind/pub_core_trampoline.h 2007-09-10 16:28:38 UTC (rev 6813)
+++ trunk/coregrind/pub_core_trampoline.h 2007-09-10 16:52:09 UTC (rev 6814)
@@ -77,6 +77,7 @@
#endif
#if defined(VGP_ppc64_linux)
+extern void VG_(ppc64_linux_SUBST_FOR_rt_sigreturn);
extern UInt VG_(ppc64_linux_REDIR_FOR_strlen)( void* );
extern void* VG_(ppc64_linux_REDIR_FOR_strchr)( void*, Int );
/* A label (sans dot) marking the ultra-magical return stub via which
|
|
From: <sv...@va...> - 2007-09-10 16:28:39
|
Author: sewardj
Date: 2007-09-10 17:28:38 +0100 (Mon, 10 Sep 2007)
New Revision: 6813
Log:
ppc32-linux signal handling: don't place the sigframe return stub on
the stack; instead use a stub in m_trampoline.S. This makes it
possible to deliver signals on non-executable stacks, and makes the
behaviour consistent with x86-linux and amd64-linux.
Modified:
trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
trunk/coregrind/m_trampoline.S
trunk/coregrind/m_translate.c
trunk/coregrind/pub_core_trampoline.h
Modified: trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c 2007-09-10 14:06:40 UTC (rev 6812)
+++ trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c 2007-09-10 16:28:38 UTC (rev 6813)
@@ -133,7 +133,7 @@
static
void stack_mcontext ( struct vki_mcontext *mc,
ThreadState* tst,
- Int ret,
+ Bool use_rt_sigreturn,
UInt fault_addr )
{
VG_TRACK( pre_mem_write, Vg_CoreSignal, tst->tid, "signal frame mcontext",
@@ -164,10 +164,18 @@
/* XXX should do FP and vector regs */
/* set up signal return trampoline */
+ /* NB. 5 Sept 07. mc->mc_pad[0..1] used to contain a the code to
+ which the signal handler returns, and it just did sys_sigreturn
+ or sys_rt_sigreturn. But this doesn't work if the stack is
+ non-executable, and it isn't consistent with the x86-linux and
+ amd64-linux scheme for removing the stack frame. So instead be
+ consistent and use a stub in m_trampoline. Then it doesn't
+ matter whether or not the (guest) stack is executable. This
+ fixes #149519 and #145837. */
VG_TRACK(pre_mem_write, Vg_CoreSignal, tst->tid, "signal frame mcontext",
(Addr)&mc->mc_pad, sizeof(mc->mc_pad));
- mc->mc_pad[0] = 0x38000000U + ret; /* li 0,ret */
- mc->mc_pad[1] = 0x44000002U; /* sc */
+ mc->mc_pad[0] = 0; /* invalid */
+ mc->mc_pad[1] = 0; /* invalid */
VG_TRACK( post_mem_write, Vg_CoreSignal, tst->tid,
(Addr)&mc->mc_pad, sizeof(mc->mc_pad) );
/* invalidate any translation of this area */
@@ -175,7 +183,10 @@
sizeof(mc->mc_pad), "stack_mcontext" );
/* set the signal handler to return to the trampoline */
- SET_SIGNAL_LR(tst, (Addr) &mc->mc_pad[0]);
+ SET_SIGNAL_LR(tst, (Addr)(use_rt_sigreturn
+ ? (Addr)&VG_(ppc32_linux_SUBST_FOR_rt_sigreturn)
+ : (Addr)&VG_(ppc32_linux_SUBST_FOR_sigreturn)
+ ));
}
//:: /* Valgrind-specific parts of the signal frame */
@@ -719,7 +730,7 @@
(Addr)&ucp->uc_regs,
sizeof(ucp->uc_regs) + sizeof(ucp->uc_sigmask) );
- stack_mcontext(&ucp->uc_mcontext, tst, __NR_rt_sigreturn, faultaddr);
+ stack_mcontext(&ucp->uc_mcontext, tst, True/*use_rt_sigreturn*/, faultaddr);
priv = &frame->priv;
SET_SIGNAL_GPR(tid, 4, (Addr) &frame->siginfo);
@@ -741,7 +752,7 @@
VG_TRACK( post_mem_write, Vg_CoreSignal, tid,
(Addr)&scp->_unused[3], sizeof(*scp) - 3 * sizeof(UInt) );
- stack_mcontext(&frame->mcontext, tst, __NR_sigreturn, faultaddr);
+ stack_mcontext(&frame->mcontext, tst, False/*!use_rt_sigreturn*/, faultaddr);
priv = &frame->priv;
SET_SIGNAL_GPR(tid, 4, (Addr) scp);
Modified: trunk/coregrind/m_trampoline.S
===================================================================
--- trunk/coregrind/m_trampoline.S 2007-09-10 14:06:40 UTC (rev 6812)
+++ trunk/coregrind/m_trampoline.S 2007-09-10 16:28:38 UTC (rev 6813)
@@ -242,6 +242,18 @@
.global VG_(trampoline_stuff_start)
VG_(trampoline_stuff_start):
+.global VG_(ppc32_linux_SUBST_FOR_sigreturn)
+VG_(ppc32_linux_SUBST_FOR_sigreturn):
+ li 0,__NR_sigreturn
+ sc
+ .long 0 /*illegal insn*/
+
+.global VG_(ppc32_linux_SUBST_FOR_rt_sigreturn)
+VG_(ppc32_linux_SUBST_FOR_rt_sigreturn):
+ li 0,__NR_rt_sigreturn
+ sc
+ .long 0 /*illegal insn*/
+
/* There's no particular reason that this needs to be handwritten
assembly, but since that's what this file contains, here's a
simple strlen implementation (written in C and compiled by gcc.)
Modified: trunk/coregrind/m_translate.c
===================================================================
--- trunk/coregrind/m_translate.c 2007-09-10 14:06:40 UTC (rev 6812)
+++ trunk/coregrind/m_translate.c 2007-09-10 16:28:38 UTC (rev 6813)
@@ -1164,8 +1164,8 @@
if ( (!translations_allowable_from_seg(seg))
|| addr == TRANSTAB_BOGUS_GUEST_ADDR ) {
if (VG_(clo_trace_signals))
- VG_(message)(Vg_DebugMsg, "translations not allowed here "
- "- throwing SEGV");
+ VG_(message)(Vg_DebugMsg, "translations not allowed here (0x%llx)"
+ " - throwing SEGV", addr);
/* U R busted, sonny. Place your hands on your head and step
away from the orig_addr. */
/* Code address is bad - deliver a signal instead */
Modified: trunk/coregrind/pub_core_trampoline.h
===================================================================
--- trunk/coregrind/pub_core_trampoline.h 2007-09-10 14:06:40 UTC (rev 6812)
+++ trunk/coregrind/pub_core_trampoline.h 2007-09-10 16:28:38 UTC (rev 6813)
@@ -69,6 +69,8 @@
#endif
#if defined(VGP_ppc32_linux)
+extern void VG_(ppc32_linux_SUBST_FOR_sigreturn);
+extern void VG_(ppc32_linux_SUBST_FOR_rt_sigreturn);
extern UInt VG_(ppc32_linux_REDIR_FOR_strlen)( void* );
extern UInt VG_(ppc32_linux_REDIR_FOR_strcmp)( void*, void* );
extern void* VG_(ppc32_linux_REDIR_FOR_strchr)( void*, Int );
|
|
From: Duncan S. <bal...@fr...> - 2007-09-10 14:16:01
|
> This is Thrcheck, a new tool for detecting errors in threaded > programs. It is still under development and is not suitable for > production use. Nice! > Compared to Helgrind, it lacks some functionality: How does it compare to drd? Best wishes, Duncan. |
|
From: <sv...@va...> - 2007-09-10 14:06:44
|
Author: sewardj
Date: 2007-09-10 15:06:40 +0100 (Mon, 10 Sep 2007)
New Revision: 6812
Log:
Some simple regression tests for Thrcheck, including 6 from helgrind/tests.
Added:
branches/THRCHECK/thrcheck/tests/hg01_all_ok.c
branches/THRCHECK/thrcheck/tests/hg01_all_ok.stderr.exp
branches/THRCHECK/thrcheck/tests/hg01_all_ok.stdout.exp
branches/THRCHECK/thrcheck/tests/hg01_all_ok.vgtest
branches/THRCHECK/thrcheck/tests/hg02_deadlock.c
branches/THRCHECK/thrcheck/tests/hg02_deadlock.stderr.exp
branches/THRCHECK/thrcheck/tests/hg02_deadlock.stdout.exp
branches/THRCHECK/thrcheck/tests/hg02_deadlock.vgtest
branches/THRCHECK/thrcheck/tests/hg03_inherit.c
branches/THRCHECK/thrcheck/tests/hg03_inherit.stderr.exp
branches/THRCHECK/thrcheck/tests/hg03_inherit.stdout.exp
branches/THRCHECK/thrcheck/tests/hg03_inherit.vgtest
branches/THRCHECK/thrcheck/tests/hg04_race.c
branches/THRCHECK/thrcheck/tests/hg04_race.stderr.exp
branches/THRCHECK/thrcheck/tests/hg04_race.stdout.exp
branches/THRCHECK/thrcheck/tests/hg04_race.vgtest
branches/THRCHECK/thrcheck/tests/hg05_race2.c
branches/THRCHECK/thrcheck/tests/hg05_race2.stderr.exp
branches/THRCHECK/thrcheck/tests/hg05_race2.stdout.exp
branches/THRCHECK/thrcheck/tests/hg05_race2.vgtest
branches/THRCHECK/thrcheck/tests/hg06_readshared.c
branches/THRCHECK/thrcheck/tests/hg06_readshared.stderr.exp
branches/THRCHECK/thrcheck/tests/hg06_readshared.stdout.exp
branches/THRCHECK/thrcheck/tests/hg06_readshared.vgtest
branches/THRCHECK/thrcheck/tests/tc01_simple_race.c
branches/THRCHECK/thrcheck/tests/tc01_simple_race.stderr.exp
branches/THRCHECK/thrcheck/tests/tc01_simple_race.stdout.exp
branches/THRCHECK/thrcheck/tests/tc01_simple_race.vgtest
branches/THRCHECK/thrcheck/tests/tc02_simple_tls.c
branches/THRCHECK/thrcheck/tests/tc02_simple_tls.stderr.exp
branches/THRCHECK/thrcheck/tests/tc02_simple_tls.stdout.exp
branches/THRCHECK/thrcheck/tests/tc02_simple_tls.vgtest
branches/THRCHECK/thrcheck/tests/tc03_re_excl.c
branches/THRCHECK/thrcheck/tests/tc03_re_excl.stderr.exp
branches/THRCHECK/thrcheck/tests/tc03_re_excl.stdout.exp
branches/THRCHECK/thrcheck/tests/tc03_re_excl.vgtest
branches/THRCHECK/thrcheck/tests/tc04_free_lock.c
branches/THRCHECK/thrcheck/tests/tc04_free_lock.stderr.exp
branches/THRCHECK/thrcheck/tests/tc04_free_lock.stdout.exp
branches/THRCHECK/thrcheck/tests/tc04_free_lock.vgtest
branches/THRCHECK/thrcheck/tests/tc05_simple_race.c
branches/THRCHECK/thrcheck/tests/tc05_simple_race.stderr.exp
branches/THRCHECK/thrcheck/tests/tc05_simple_race.stdout.exp
branches/THRCHECK/thrcheck/tests/tc05_simple_race.vgtest
branches/THRCHECK/thrcheck/tests/tc06_two_races.c
branches/THRCHECK/thrcheck/tests/tc06_two_races.stderr.exp
branches/THRCHECK/thrcheck/tests/tc06_two_races.stdout.exp
branches/THRCHECK/thrcheck/tests/tc06_two_races.vgtest
branches/THRCHECK/thrcheck/tests/tc07_hbl1.c
branches/THRCHECK/thrcheck/tests/tc07_hbl1.stderr.exp
branches/THRCHECK/thrcheck/tests/tc07_hbl1.stdout.exp
branches/THRCHECK/thrcheck/tests/tc07_hbl1.vgtest
branches/THRCHECK/thrcheck/tests/tc08_hbl2.c
branches/THRCHECK/thrcheck/tests/tc08_hbl2.stderr.exp
branches/THRCHECK/thrcheck/tests/tc08_hbl2.stdout.exp
branches/THRCHECK/thrcheck/tests/tc08_hbl2.vgtest
branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.c
branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.stderr.exp
branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.stdout.exp
branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.vgtest
branches/THRCHECK/thrcheck/tests/tc10_rec_lock.c
branches/THRCHECK/thrcheck/tests/tc10_rec_lock.stderr.exp
branches/THRCHECK/thrcheck/tests/tc10_rec_lock.stdout.exp
branches/THRCHECK/thrcheck/tests/tc10_rec_lock.vgtest
Modified:
branches/THRCHECK/thrcheck/tests/Makefile.am
Modified: branches/THRCHECK/thrcheck/tests/Makefile.am
===================================================================
--- branches/THRCHECK/thrcheck/tests/Makefile.am 2007-09-10 14:04:57 UTC (rev 6811)
+++ branches/THRCHECK/thrcheck/tests/Makefile.am 2007-09-10 14:06:40 UTC (rev 6812)
@@ -7,28 +7,50 @@
noinst_SCRIPTS = filter_stderr
EXTRA_DIST = $(noinst_SCRIPTS) \
- allok.stderr.exp allok.vgtest \
- deadlock.stderr.exp deadlock.vgtest \
- inherit.stderr.exp inherit.vgtest \
- race.stderr.exp race.vgtest \
- race2.stderr.exp race2.vgtest \
- readshared.stderr.exp readshared.vgtest \
- toobig-allocs.stderr.exp toobig-allocs.vgtest
+ hg01_all_ok.vgtest hg01_all_ok.stderr.exp hg01_all_ok.stdout.exp \
+ hg02_deadlock.vgtest hg02_deadlock.stderr.exp hg02_deadlock.stdout.exp \
+ hg03_inherit.vgtest hg03_inherit.stderr.exp hg03_inherit.stdout.exp \
+ hg04_race.vgtest hg04_race.stderr.exp hg04_race.stdout.exp \
+ hg05_race2.vgtest hg05_race2.stderr.exp hg05_race2.stdout.exp \
+ hg06_readshared.vgtest hg06_readshared.stderr.exp \
+ hg06_readshared.stdout.exp \
+ tc01_simple_race.vgtest tc01_simple_race.stderr.exp \
+ tc01_simple_race.stdout.exp \
+ tc02_simple_tls.vgtest tc02_simple_tls.stderr.exp \
+ tc02_simple_tls.stdout.exp \
+ tc03_re_excl.vgtest tc03_re_excl.stderr.exp tc03_re_excl.stdout.exp \
+ tc04_free_lock.vgtest tc04_free_lock.stderr.exp \
+ tc04_free_lock.stdout.exp \
+ tc05_simple_race.vgtest tc05_simple_race.stderr.exp \
+ tc05_simple_race.stdout.exp \
+ tc06_two_races.vgtest tc06_two_races.stderr.exp \
+ tc06_two_races.stdout.exp \
+ tc07_hbl1.vgtest tc07_hbl1.stderr.exp tc07_hbl1.stdout.exp \
+ tc08_hbl2.vgtest tc08_hbl2.stderr.exp tc08_hbl2.stdout.exp \
+ tc09_bad_unlock.vgtest tc09_bad_unlock.stderr.exp \
+ tc09_bad_unlock.stdout.exp \
+ tc10_rec_lock.vgtest tc10_rec_lock.stderr.exp \
+ tc10_rec_lock.stdout.exp
check_PROGRAMS = \
- allok deadlock inherit race race2 readshared
+ hg01_all_ok \
+ hg02_deadlock \
+ hg03_inherit \
+ hg04_race \
+ hg05_race2 \
+ hg06_readshared \
+ tc01_simple_race \
+ tc02_simple_tls \
+ tc03_re_excl \
+ tc04_free_lock \
+ tc05_simple_race \
+ tc06_two_races \
+ tc07_hbl1 \
+ tc08_hbl2 \
+ tc09_bad_unlock \
+ tc10_rec_lock
-# force -gstabs, because we don't print symaddr for DWARF yet
-# Sigh, gcc-3.4.3 on ppc64 generates bogus .stabs. So disable it
-# for now on ppc64-linux.
-if VGP_PPC64_LINUX
+# is this necessary?
AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-else
-# In fact -gstabs is broken on many systems now
-#AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -gstabs $(AM_FLAG_M3264_PRI)
-AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-
-endif
-
LDADD = -lpthread
Added: branches/THRCHECK/thrcheck/tests/hg01_all_ok.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg01_all_ok.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg01_all_ok.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,32 @@
+/* All OK */
+
+#include <pthread.h>
+
+static pthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER;
+
+static int shared;
+
+static void *th(void *v)
+{
+ pthread_mutex_lock(&mx);
+ shared++;
+ pthread_mutex_unlock(&mx);
+
+ return 0;
+}
+
+int main()
+{
+ pthread_t a, b;
+
+ pthread_mutex_lock(&mx);
+ pthread_mutex_unlock(&mx);
+
+ pthread_create(&a, NULL, th, NULL);
+ pthread_create(&b, NULL, th, NULL);
+
+ pthread_join(a, NULL);
+ pthread_join(b, NULL);
+
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/hg01_all_ok.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg01_all_ok.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg01_all_ok.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg01_all_ok.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg01_all_ok.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: hg01_all_ok
Added: branches/THRCHECK/thrcheck/tests/hg02_deadlock.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg02_deadlock.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg02_deadlock.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,43 @@
+/* Simple possible deadlock */
+#include <pthread.h>
+
+static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
+
+static void *t1(void *v)
+{
+ pthread_mutex_lock(&m1);
+ pthread_mutex_lock(&m2);
+ pthread_mutex_unlock(&m1);
+ pthread_mutex_unlock(&m2);
+
+ return 0;
+}
+
+static void *t2(void *v)
+{
+ pthread_mutex_lock(&m2);
+ pthread_mutex_lock(&m1);
+ pthread_mutex_unlock(&m1);
+ pthread_mutex_unlock(&m2);
+
+ return 0;
+}
+
+int main()
+{
+ pthread_t a, b;
+
+ /* prevent spurious messages from the dynamic linker */
+ pthread_mutex_lock(&m1);
+ pthread_mutex_unlock(&m1);
+
+ pthread_create(&a, NULL, t1, NULL);
+ pthread_create(&b, NULL, t2, NULL);
+
+ pthread_join(a, NULL);
+ pthread_join(b, NULL);
+
+ return 0;
+}
+
Added: branches/THRCHECK/thrcheck/tests/hg02_deadlock.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg02_deadlock.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg02_deadlock.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg02_deadlock.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg02_deadlock.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: hg02_deadlock
Added: branches/THRCHECK/thrcheck/tests/hg03_inherit.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg03_inherit.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg03_inherit.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,55 @@
+/* test child thread inheriting data */
+
+// ***
+//
+// Helgrind should detect an error on line 48 for this test, but it doesn't!
+//
+// ***
+
+#include <pthread.h>
+#include <unistd.h>
+
+static volatile int shared[2];
+
+static void *t1(void *v)
+{
+ volatile int *ip = (int *)v;
+ *ip += 44;
+ *ip *= 2;
+ sleep(1);
+ return 0;
+}
+
+static void *t2(void *v)
+{
+ volatile int *ip = (int *)v;
+ *ip += 88;
+ *ip *= 3;
+ sleep(2);
+ return 0;
+}
+
+int main()
+{
+ pthread_t a, b;
+ volatile int ret = 0;
+
+ sleep(0);
+
+ shared[0] = 22;
+ shared[1] = 77;
+
+ pthread_create(&a, NULL, t1, (void *)&shared[0]);
+ pthread_create(&b, NULL, t2, (void *)&shared[1]);
+
+ pthread_join(a, NULL);
+
+ ret += shared[0]; /* no error - a is finished */
+ ret += shared[1]; /* expect error - b has not finished,
+ so we can't touch shared[1] yet */
+
+ pthread_join(b, NULL);
+
+
+ return ret;
+}
Added: branches/THRCHECK/thrcheck/tests/hg03_inherit.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg03_inherit.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg03_inherit.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg03_inherit.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg03_inherit.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: hg03_inherit
Added: branches/THRCHECK/thrcheck/tests/hg04_race.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg04_race.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg04_race.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,27 @@
+/* A simple race */
+
+#include <pthread.h>
+#include <unistd.h>
+
+static int shared;
+
+static void *th(void *v)
+{
+ shared++;
+
+ return 0;
+}
+
+int main()
+{
+ pthread_t a, b;
+
+ pthread_create(&a, NULL, th, NULL);
+ sleep(1); /* force ordering */
+ pthread_create(&b, NULL, th, NULL);
+
+ pthread_join(a, NULL);
+ pthread_join(b, NULL);
+
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/hg04_race.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg04_race.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg04_race.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg04_race.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg04_race.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: hg04_race
Added: branches/THRCHECK/thrcheck/tests/hg05_race2.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg05_race2.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg05_race2.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,35 @@
+/* A simple race - test symaddr */
+
+#include <pthread.h>
+#include <unistd.h>
+
+struct foo {
+ struct bar {
+ int plop[22];
+ char biff;
+ } poot[11];
+};
+
+static void *th(void *v)
+{
+ struct foo *f = (struct foo *)v;
+
+ f->poot[5].plop[11]++;
+
+ return 0;
+}
+
+int main()
+{
+ struct foo foo;
+ pthread_t a, b;
+
+ pthread_create(&a, NULL, th, &foo);
+ sleep(1); /* force ordering */
+ pthread_create(&b, NULL, th, &foo);
+
+ pthread_join(a, NULL);
+ pthread_join(b, NULL);
+
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/hg05_race2.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg05_race2.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg05_race2.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg05_race2.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg05_race2.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: hg05_race2
Added: branches/THRCHECK/thrcheck/tests/hg06_readshared.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg06_readshared.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg06_readshared.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,33 @@
+/* All OK - test allowed read sharing */
+
+#include <pthread.h>
+#include <assert.h>
+
+static int shared;
+
+static void *t1(void *v)
+{
+ return (void *)(long)(shared + 44);
+}
+
+static void *t2(void *v)
+{
+ return (void *)(long)(shared + 55);
+}
+
+int main()
+{
+ pthread_t a, b;
+
+ shared = 22;
+
+ pthread_create(&a, NULL, t1, NULL);
+ pthread_create(&b, NULL, t2, NULL);
+
+ pthread_join(a, NULL);
+ pthread_join(b, NULL);
+
+ assert(shared == 22);
+
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/hg06_readshared.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg06_readshared.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/hg06_readshared.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/hg06_readshared.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/hg06_readshared.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: hg06_readshared
Added: branches/THRCHECK/thrcheck/tests/tc01_simple_race.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc01_simple_race.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc01_simple_race.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,36 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Simple test program, has a race. Parent and child both modify x
+ with no locking. */
+
+int x = 0;
+
+void* child_fn ( void* arg )
+{
+ /* Unprotected relative to parent */
+ x++;
+ return NULL;
+}
+
+int main ( void )
+{
+ pthread_t child;
+
+ if (pthread_create(&child, NULL, child_fn, NULL)) {
+ perror("pthread_create");
+ exit(1);
+ }
+
+ /* Unprotected relative to child */
+ x++;
+
+ if (pthread_join(child, NULL)) {
+ perror("pthread join");
+ exit(1);
+ }
+
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/tc01_simple_race.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc01_simple_race.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc01_simple_race.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc01_simple_race.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc01_simple_race.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc01_simple_race
Added: branches/THRCHECK/thrcheck/tests/tc02_simple_tls.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc02_simple_tls.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc02_simple_tls.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,39 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Simple test program, no race: parent only modified x after child
+ has modified it and then joined with the parent. Tests simple
+ thread lifetime segment handling. */
+
+int x = 0;
+
+void* child_fn ( void* arg )
+{
+ /* Unprotected relative to parent, but in child's segment only */
+ x++;
+ return NULL;
+}
+
+int main ( void )
+{
+ pthread_t child;
+
+ x++; /* happens in parent's segment */
+
+ if (pthread_create(&child, NULL, child_fn, NULL)) {
+ perror("pthread_create");
+ exit(1);
+ }
+
+ if (pthread_join(child, NULL)) {
+ perror("pthread join");
+ exit(1);
+ }
+
+ /* Now back in parent's segment */
+ x++;
+
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/tc02_simple_tls.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc02_simple_tls.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc02_simple_tls.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc02_simple_tls.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc02_simple_tls.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc02_simple_tls
Added: branches/THRCHECK/thrcheck/tests/tc03_re_excl.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc03_re_excl.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc03_re_excl.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,45 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Simple test program, no race: parent only modified x after child
+ has modified it and then joined with the parent. Tests simple
+ thread lifetime segment handling. */
+
+/* A simple function to "use" a value, so that gcc can't
+ possibly optimise it into nothing. */
+static void use ( int x ) {
+ __asm__ __volatile__( "nop" : : "r"(x) : "cc","memory" );
+}
+
+static void* worker_thread ( void* argV )
+{
+ int* arg = (int*)argV;
+ use(arg[5]); /* read access */
+ return NULL;
+}
+
+int main ( void )
+{
+ pthread_t thread_id;
+ int* x = malloc(10 * sizeof(int));
+ x[5] = 0;
+ /* x[5] is Excl(parent) */
+
+ pthread_create(&thread_id, 0, worker_thread, x);
+
+ use(x[5]); /* read access */
+
+ /* Just before the threads join, x[5] is ShR (read by both parent
+ and child) */
+ pthread_join(thread_id, 0);
+ /* x[5] is Excl(parent), because only parent and child accessed it
+ and child has merged to parent. So now it's ok for parent to
+ access it without locking. */
+
+ x[5] = 99; /* write access */
+
+ free(x);
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/tc03_re_excl.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc03_re_excl.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc03_re_excl.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc03_re_excl.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc03_re_excl.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc03_re_excl
Added: branches/THRCHECK/thrcheck/tests/tc04_free_lock.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc04_free_lock.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc04_free_lock.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,50 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+
+/* Delete memory that has a held lock and see what happens. */
+
+typedef struct { int stuff[2000];
+ pthread_mutex_t lock; int morestuff[2000]; } XX;
+
+void bar ( void );
+void foo ( void );
+
+int main ( void )
+{
+ XX* xx = malloc(sizeof(XX));
+ assert(xx);
+
+ pthread_mutex_init( &xx->lock, NULL );
+
+ pthread_mutex_lock( &xx->lock );
+
+ free(xx);
+
+ bar();
+ foo();
+ bar();
+
+ return 0;
+}
+
+/* Try the same, on the stack */
+void bar ( void )
+{
+ pthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER;
+ // pthread_mutex_init( &mx, NULL );
+ pthread_mutex_lock( &mx );
+ /* now just abandon mx */
+}
+
+/* and again ... */
+void foo ( void )
+{
+ pthread_mutex_t mx;
+ pthread_mutex_init( &mx, NULL );
+ pthread_mutex_lock( &mx );
+ /* now just abandon mx */
+}
+
Added: branches/THRCHECK/thrcheck/tests/tc04_free_lock.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc04_free_lock.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc04_free_lock.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc04_free_lock.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc04_free_lock.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc04_free_lock
Added: branches/THRCHECK/thrcheck/tests/tc05_simple_race.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc05_simple_race.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc05_simple_race.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,44 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Simple test program, has a race. Parent and child both modify y
+ with no locking. This is the program shown in Fig 2 of the
+ original Eraser paper by Savage et al. */
+
+int y = 0, v = 0;
+pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER;
+
+void* child_fn ( void* arg )
+{
+ /* "Thread 2" in the paper */
+ pthread_mutex_lock( &mu );
+ v = v + 1;
+ pthread_mutex_unlock( &mu );
+ y = y + 1;
+ return NULL;
+}
+
+int main ( void )
+{
+ pthread_t child;
+
+ if (pthread_create(&child, NULL, child_fn, NULL)) {
+ perror("pthread_create");
+ exit(1);
+ }
+
+ /* "Thread 1" in the paper */
+ y = y + 1;
+ pthread_mutex_lock( &mu );
+ v = v + 1;
+ pthread_mutex_unlock( &mu );
+
+ if (pthread_join(child, NULL)) {
+ perror("pthread join");
+ exit(1);
+ }
+
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/tc05_simple_race.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc05_simple_race.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc05_simple_race.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc05_simple_race.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc05_simple_race.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc05_simple_race
Added: branches/THRCHECK/thrcheck/tests/tc06_two_races.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc06_two_races.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc06_two_races.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,43 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Simple test program, has two races. A happens-before detector can only
+ ever detect one of them, though. */
+
+int unprot1 = 0, unprot2 = 0, prot = 0;
+pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER;
+
+void* child_fn ( void* arg )
+{
+ unprot1 ++;
+ pthread_mutex_lock( &mu );
+ prot ++;
+ pthread_mutex_unlock( &mu );
+ unprot2 ++;
+ return NULL;
+}
+
+int main ( void )
+{
+ pthread_t child;
+
+ if (pthread_create(&child, NULL, child_fn, NULL)) {
+ perror("pthread_create");
+ exit(1);
+ }
+
+ unprot1 ++;
+ pthread_mutex_lock( &mu );
+ prot ++;
+ pthread_mutex_unlock( &mu );
+ unprot2 ++;
+
+ if (pthread_join(child, NULL)) {
+ perror("pthread join");
+ exit(1);
+ }
+
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/tc06_two_races.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc06_two_races.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc06_two_races.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc06_two_races.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc06_two_races.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc06_two_races
Added: branches/THRCHECK/thrcheck/tests/tc07_hbl1.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc07_hbl1.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc07_hbl1.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,66 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Simple test program, no race. Parent and child both modify x and
+ use the hardware bus lock. */
+
+#undef PLAT_x86_linux
+#undef PLAT_amd64_linux
+#undef PLAT_ppc32_linux
+#undef PLAT_ppc64_linux
+#undef PLAT_ppc32_aix5
+#undef PLAT_ppc64_aix5
+
+#if !defined(_AIX) && defined(__i386__)
+# define PLAT_x86_linux 1
+#elif !defined(_AIX) && defined(__x86_64__)
+# define PLAT_amd64_linux 1
+#elif !defined(_AIX) && defined(__powerpc__) && !defined(__powerpc64__)
+# define PLAT_ppc32_linux 1
+#elif !defined(_AIX) && defined(__powerpc__) && defined(__powerpc64__)
+# define PLAT_ppc64_linux 1
+#elif defined(_AIX) && defined(__64BIT__)
+# define PLAT_ppc64_aix5 1
+#elif defined(_AIX) && !defined(__64BIT__)
+# define PLAT_ppc32_aix5 1
+#endif
+
+
+#if defined(PLAT_amd64_linux)
+# define INC(_lval) \
+ __asm__ __volatile__ ( \
+ "lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" )
+#else
+# error "Fix Me for this platform"
+#endif
+
+
+int x = 0;
+
+void* child_fn ( void* arg )
+{
+ INC(x);
+ return NULL;
+}
+
+int main ( void )
+{
+ pthread_t child;
+
+ if (pthread_create(&child, NULL, child_fn, NULL)) {
+ perror("pthread_create");
+ exit(1);
+ }
+
+ INC(x);
+
+ if (pthread_join(child, NULL)) {
+ perror("pthread join");
+ exit(1);
+ }
+
+ printf("x = %d\n", x);
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/tc07_hbl1.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc07_hbl1.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc07_hbl1.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc07_hbl1.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc07_hbl1.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc07_hbl1
Added: branches/THRCHECK/thrcheck/tests/tc08_hbl2.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc08_hbl2.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc08_hbl2.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,87 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sched.h>
+
+/* Simple test program, no race. Parent writes atomically to a counter
+ whilst child reads it. When counter reaches a prearranged value,
+ child joins back to parent. Parent (writer) uses hardware bus lock;
+ child is only reading and so does not need to use a bus lock. */
+
+
+#undef PLAT_x86_linux
+#undef PLAT_amd64_linux
+#undef PLAT_ppc32_linux
+#undef PLAT_ppc64_linux
+#undef PLAT_ppc32_aix5
+#undef PLAT_ppc64_aix5
+
+#if !defined(_AIX) && defined(__i386__)
+# define PLAT_x86_linux 1
+#elif !defined(_AIX) && defined(__x86_64__)
+# define PLAT_amd64_linux 1
+#elif !defined(_AIX) && defined(__powerpc__) && !defined(__powerpc64__)
+# define PLAT_ppc32_linux 1
+#elif !defined(_AIX) && defined(__powerpc__) && defined(__powerpc64__)
+# define PLAT_ppc64_linux 1
+#elif defined(_AIX) && defined(__64BIT__)
+# define PLAT_ppc64_aix5 1
+#elif defined(_AIX) && !defined(__64BIT__)
+# define PLAT_ppc32_aix5 1
+#endif
+
+
+#if defined(PLAT_amd64_linux)
+# define INC(_lval) \
+ __asm__ __volatile__ ( \
+ "lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" )
+#else
+# error "Fix Me for this platform"
+#endif
+
+
+
+#define LIMIT 10
+
+int x = 0;
+
+void* child_fn ( void* arg )
+{
+ int q = 0;
+ int oldx = 0;
+ while (1) {
+ q = x == LIMIT;
+ if (x != oldx) {
+ oldx = x;
+ printf("child: new value %d\n", oldx);
+ }
+ if (q) break;
+ }
+ return NULL;
+}
+
+int main ( void )
+{
+ pthread_t child;
+ int i;
+
+ if (pthread_create(&child, NULL, child_fn, NULL)) {
+ perror("pthread_create");
+ exit(1);
+ }
+
+ for (i = 0; i < LIMIT; i++) {
+ INC(x);
+ /* Not really necessary, but just gives the child a chance
+ to run too. */
+ sched_yield();
+ }
+
+ if (pthread_join(child, NULL)) {
+ perror("pthread join");
+ exit(1);
+ }
+
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/tc08_hbl2.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc08_hbl2.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc08_hbl2.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc08_hbl2.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc08_hbl2.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc08_hbl2
Added: branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,52 @@
+
+/* Check that an error is reported for various kinds of bogus
+ pthread_mutex_unlock calls. */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void* child_fn ( void* arg )
+{
+ pthread_mutex_unlock( (pthread_mutex_t*)arg ); /* ERROR */
+ return NULL;
+}
+
+void nearly_main ( void )
+{
+ pthread_t child;
+ pthread_mutex_t mx1, mx2;
+ int bogus[100];
+
+ /* Unlocking a lock that is already unlocked */
+
+ pthread_mutex_init( &mx1, NULL );
+ pthread_mutex_lock( &mx1 );
+ pthread_mutex_unlock( &mx1 );
+
+ pthread_mutex_unlock( &mx1 ); /* ERROR */
+
+ /* Unlocking a lock that is held by a different thread */
+
+ pthread_mutex_init( &mx2, NULL );
+ pthread_mutex_lock( &mx2 );
+ // start child and get it to unlock this lock
+
+ pthread_create( &child, NULL, child_fn, (void*)&mx2 );
+ /* child runs and attempts to unlock our lock. Error
+ is reported in child_fn. */
+ pthread_join(child, NULL );
+
+ /* Unlocking a totally bogus lock. */
+ pthread_mutex_unlock( (pthread_mutex_t*) &bogus[50] ); /* ERROR */
+
+ /* Now we get a freeing-locked-lock error, since the stack
+ frame is removed whilst mx2 is still locked. */
+}
+
+int main ( void )
+{
+ nearly_main();
+ nearly_main();
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc09_bad_unlock.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc09_bad_unlock
Added: branches/THRCHECK/thrcheck/tests/tc10_rec_lock.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc10_rec_lock.c (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc10_rec_lock.c 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1,46 @@
+
+/* Do simple things with a recursive mutex. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#define __USE_UNIX98 1
+#include <pthread.h>
+
+void nearly_main ( void )
+{
+ pthread_mutex_t mx1;
+ pthread_mutexattr_t attr;
+ int r;
+
+ r = pthread_mutexattr_init( &attr );
+ assert(r==0);
+ r = pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE );
+ assert(r==0);
+ r = pthread_mutex_init( &mx1, &attr );
+ assert(r==0);
+
+ fprintf(stderr, "before lock #1\n");
+ r = pthread_mutex_lock( &mx1 ); assert(r == 0);
+ fprintf(stderr, "before lock #2\n");
+ r = pthread_mutex_lock( &mx1 ); assert(r == 0);
+ fprintf(stderr, "before lock #3\n");
+ r = pthread_mutex_lock( &mx1 ); assert(r == 0);
+
+ fprintf(stderr, "before unlock #1\n");
+ r = pthread_mutex_unlock( &mx1 ); assert(r == 0);
+ fprintf(stderr, "before unlock #2\n");
+ r = pthread_mutex_unlock( &mx1 ); assert(r == 0);
+ fprintf(stderr, "before unlock #3\n");
+ r = pthread_mutex_unlock( &mx1 ); assert(r == 0);
+
+ fprintf(stderr, "before unlock #4\n");
+ r = pthread_mutex_unlock( &mx1 ); /* FAILS: assert(r == 0); */
+}
+
+int main ( void )
+{
+ nearly_main();
+ return 0;
+}
Added: branches/THRCHECK/thrcheck/tests/tc10_rec_lock.stderr.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc10_rec_lock.stdout.exp
===================================================================
Added: branches/THRCHECK/thrcheck/tests/tc10_rec_lock.vgtest
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc10_rec_lock.vgtest (rev 0)
+++ branches/THRCHECK/thrcheck/tests/tc10_rec_lock.vgtest 2007-09-10 14:06:40 UTC (rev 6812)
@@ -0,0 +1 @@
+prog: tc10_rec_lock
|
|
From: <sv...@va...> - 2007-09-10 14:05:08
|
Author: sewardj Date: 2007-09-10 15:04:57 +0100 (Mon, 10 Sep 2007) New Revision: 6811 Log: This is Thrcheck, a new tool for detecting errors in threaded programs. It is still under development and is not suitable for production use. Compared to Helgrind, it lacks some functionality: * no checking of lock acquisition ordering problems * no support for x86/amd64 LOCK prefixes or PPC equivalents * no support for reader-writer locks * many important pthread_ functions are not handled (pthread_rwlock_*, pthread_spinlock_*, semaphores) * does not print any source-level description of the data locations involved in race reports On the other hand: * it at least works in the current Valgrind framework * it uses a more sophisticated model of memory ownership in the hope of getting a lower false error rate during race detection * it tries to produce additional information in race error reports, so as to assist programmers in tracking down the root causes of reported problems Is currently lightly tested on x86-linux and amd64-linux. Will not work on any other platforms. Added: branches/THRCHECK/thrcheck/Makefile.am branches/THRCHECK/thrcheck/tc_intercepts.c branches/THRCHECK/thrcheck/tc_main.c branches/THRCHECK/thrcheck/tc_wordfm.c branches/THRCHECK/thrcheck/tc_wordfm.h branches/THRCHECK/thrcheck/tc_wordset.c branches/THRCHECK/thrcheck/tc_wordset.h branches/THRCHECK/thrcheck/thrcheck.h [... diff too large to include ...] |
|
From: <sv...@va...> - 2007-09-10 13:49:02
|
Author: sewardj
Date: 2007-09-10 14:48:49 +0100 (Mon, 10 Sep 2007)
New Revision: 6810
Log:
Top level build stuff for Thrcheck.
Modified:
branches/THRCHECK/Makefile.am
branches/THRCHECK/configure.in
branches/THRCHECK/glibc-2.5.supp
Modified: branches/THRCHECK/Makefile.am
===================================================================
--- branches/THRCHECK/Makefile.am 2007-09-10 13:47:20 UTC (rev 6809)
+++ branches/THRCHECK/Makefile.am 2007-09-10 13:48:49 UTC (rev 6810)
@@ -8,6 +8,7 @@
callgrind \
massif \
lackey \
+ thrcheck \
none
# Temporary: we want to compile Helgrind, but not regtest it.
Modified: branches/THRCHECK/configure.in
===================================================================
--- branches/THRCHECK/configure.in 2007-09-10 13:47:20 UTC (rev 6809)
+++ branches/THRCHECK/configure.in 2007-09-10 13:48:49 UTC (rev 6810)
@@ -979,6 +979,9 @@
helgrind/Makefile
helgrind/tests/Makefile
helgrind/docs/Makefile
+ thrcheck/Makefile
+ thrcheck/tests/Makefile
+ thrcheck/docs/Makefile
massif/Makefile
massif/hp2ps/Makefile
massif/tests/Makefile
Modified: branches/THRCHECK/glibc-2.5.supp
===================================================================
--- branches/THRCHECK/glibc-2.5.supp 2007-09-10 13:47:20 UTC (rev 6809)
+++ branches/THRCHECK/glibc-2.5.supp 2007-09-10 13:48:49 UTC (rev 6810)
@@ -213,3 +213,146 @@
obj:/lib/libpthread-0.10.so
fun:pthread_create
}
+
+##----------------------------------------------------------------------##
+# Suppressions for the Thrcheck tool
+
+{
+ thrcheck-glibc25-1
+ Thrcheck:Race
+ fun:_dl_lookup_symbol_x
+ fun:_dl_fixup
+ fun:_dl_runtime_resolve
+}
+{
+ thrcheck-glibc25-1.1
+ Thrcheck:Race
+ fun:do_lookup_x
+ fun:_dl_lookup_symbol_x
+ fun:_dl_fixup
+}
+{
+ thrcheck-glibc25-2
+ Thrcheck:Race
+ fun:pthread_join
+ fun:pthread_join
+}
+{
+ thrcheck-glibc25-3
+ Thrcheck:Race
+ fun:__free_tcb
+ fun:pthread_join
+ fun:pthread_join
+}
+{
+ thrcheck-glibc25-4
+ Thrcheck:Race
+ fun:_IO_file_xsputn*
+ fun:vfprintf
+ fun:*printf
+}
+{
+ thrcheck-glibc25-5
+ Thrcheck:Race
+ fun:_IO_file_overflow*
+ fun:_IO_file_xsputn*
+ fun:*printf
+}
+{
+ thrcheck-glibc25-6
+ Thrcheck:Race
+ fun:vfprintf
+ fun:printf
+}
+{
+ thrcheck-glibc25-7
+ Thrcheck:Race
+ fun:new_do_write
+ fun:_IO_do_write*
+ fun:_IO_file_xsputn*
+ fun:*printf
+}
+{
+ thrcheck-glibc25-7a
+ Thrcheck:Race
+ fun:new_do_write
+ fun:_IO_file_xsputn*
+ fun:*printf
+}
+{
+ thrcheck-glibc25-8
+ Thrcheck:Race
+ fun:new_do_write
+ fun:_IO_do_write*
+ fun:_IO_file_overflow*
+ fun:_IO_file_xsputn*
+}
+{
+ thrcheck-glibc25-9
+ Thrcheck:Race
+ fun:start_thread
+ fun:clone
+}
+{
+ thrcheck-glibc25-10
+ Thrcheck:Race
+ fun:_dl_fini
+ fun:exit
+}
+
+{
+ thrcheck-wrappers-glibc-mutex_lock-1
+ Thrcheck:Race
+ fun:pthread_mutex_lock
+ fun:pthread_mutex_lock
+}
+
+{
+ thrcheck-wrappers-glibc-create-1
+ Thrcheck:Race
+ fun:pthread_create@@GLIBC_*
+ fun:pthread_create@*
+}
+
+# This is very ugly. It is needed to suppress errors inside
+# NPTL's pthread_cond_signal. Why only one stack frame --
+# at least we should see the wrapper calling the real function,
+# right? Unfortunately, no: the real function is handwritten
+# assembly (in the glibc-2.5 sources) and does not create a proper
+# stack frame. Therefore it's only one level of unwinding before
+# we're back out in user code rather than the 2 levels you'd expect.
+{
+ thrcheck-wrappers-glibc-cond_sig-1
+ Thrcheck:Race
+ fun:pthread_cond_signal@@GLIBC_2.3.2
+}
+
+# ditto
+{
+ thrcheck-wrappers-glibc-cond_wait-1
+ Thrcheck:Race
+ fun:pthread_cond_wait@@GLIBC_2.3.2
+}
+
+# ditto
+{
+ thrcheck-wrappers-glibc-mutex_trylock-1
+ Thrcheck:Race
+ fun:pthread_mutex_trylock
+}
+
+
+{
+ thrcheck-wrappers-glibc-cond_wait-1
+ Thrcheck:Race
+ fun:pthread_cond_wait@@GLIBC_*
+ fun:pthread_cond_wait*
+}
+
+{
+ thrcheck-wrappers-1000
+ Thrcheck:Race
+ fun:__pthread_mutex_unlock_usercnt
+ fun:pthread_mutex_unlock
+ fun:pthread_mutex_unlock
+}
|
|
From: <sv...@va...> - 2007-09-10 13:47:20
|
Author: sewardj
Date: 2007-09-10 14:47:20 +0100 (Mon, 10 Sep 2007)
New Revision: 6809
Log:
Darn again. This should also have been included in r6802
(For VG_(record_ExeContext) et al, add a new parameter ...)
Modified:
branches/THRCHECK/massif/ms_main.c
Modified: branches/THRCHECK/massif/ms_main.c
===================================================================
--- branches/THRCHECK/massif/ms_main.c 2007-09-10 13:35:02 UTC (rev 6808)
+++ branches/THRCHECK/massif/ms_main.c 2007-09-10 13:47:20 UTC (rev 6809)
@@ -431,7 +431,8 @@
// it is enough.
overestimate = 2;
while (True) {
- n_ips = VG_(get_StackTrace)( tid, ips, clo_depth + overestimate );
+ n_ips = VG_(get_StackTrace)( tid, ips, clo_depth + overestimate,
+ 0/*first_ip_delta*/ );
// Now we add a dummy "unknown" IP at the end. This is only used if we
// run out of IPs before hitting clo_depth. It's done to ensure the
|
|
From: <sv...@va...> - 2007-09-10 13:35:06
|
Author: sewardj
Date: 2007-09-10 14:35:02 +0100 (Mon, 10 Sep 2007)
New Revision: 6808
Log:
Oops. This should have been included in r6805 (Modify two
thread-notification events in the core-tool interface...)
Modified:
branches/THRCHECK/include/pub_tool_tooliface.h
Modified: branches/THRCHECK/include/pub_tool_tooliface.h
===================================================================
--- branches/THRCHECK/include/pub_tool_tooliface.h 2007-09-10 05:17:34 UTC (rev 6807)
+++ branches/THRCHECK/include/pub_tool_tooliface.h 2007-09-10 13:35:02 UTC (rev 6808)
@@ -562,13 +562,18 @@
/* Thread events (not exhaustive)
- Called during thread create, before the new thread has run any
- instructions (or touched any memory).
- */
-void VG_(track_post_thread_create)(void(*f)(ThreadId tid, ThreadId child));
-void VG_(track_post_thread_join) (void(*f)(ThreadId joiner, ThreadId joinee));
+ ll_create: low level thread creation. Called before the new thread
+ has run any instructions (or touched any memory). In fact, called
+ immediately before the new thread has come into existence; the new
+ thread can be assumed to exist when notified by this call.
+ ll_exit: low level thread exit. Called after the exiting thread
+ has run its last instruction.
+*/
+void VG_(track_pre_thread_ll_create)(void(*f)(ThreadId tid, ThreadId child));
+void VG_(track_pre_thread_ll_exit) (void(*f)(ThreadId tid));
+
/* Signal events (not exhaustive)
... pre_send_signal, post_send_signal ...
|
|
From: <js...@ac...> - 2007-09-10 12:28:33
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2007-09-10 09:00:02 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 220 tests, 10 stderr failures, 7 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/round (stdout) none/tests/ppc32/round (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) none/tests/tls (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 220 tests, 10 stderr failures, 6 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/round (stdout) none/tests/ppc32/round (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Mon Sep 10 09:11:59 2007 --- new.short Mon Sep 10 09:23:56 2007 *************** *** 8,10 **** ! == 220 tests, 10 stderr failures, 6 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) --- 8,10 ---- ! == 220 tests, 10 stderr failures, 7 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) *************** *** 25,26 **** --- 25,27 ---- none/tests/ppc32/test_gx (stdout) + none/tests/tls (stdout) |
|
From: <sv...@va...> - 2007-09-10 05:17:33
|
Author: sewardj
Date: 2007-09-10 06:17:34 +0100 (Mon, 10 Sep 2007)
New Revision: 6807
Log:
Clarify comment in r6806.
Modified:
branches/THRCHECK/include/valgrind.h
Modified: branches/THRCHECK/include/valgrind.h
===================================================================
--- branches/THRCHECK/include/valgrind.h 2007-09-09 21:54:53 UTC (rev 6806)
+++ branches/THRCHECK/include/valgrind.h 2007-09-10 05:17:34 UTC (rev 6807)
@@ -1032,10 +1032,10 @@
Why is this important? Imagine that a wrapper has a stack
allocated local, and passes to the hidden call, a pointer to it.
- Because gcc does not know about the hidden call, it can allocate
+ Because gcc does not know about the hidden call, it may allocate
that local in the redzone. Unfortunately the hidden call may then
- trash it before it comes to use it. So we must clear the redzone
- to make it safe.
+ trash it before it comes to use it. So we must step clear of the
+ redzone, for the duration of the hidden call, to make it safe.
Probably the same problem afflicts the other redzone-style ABIs too
(ppc64-linux, ppc32-aix5, ppc64-aix5); but for those, the stack is
|
|
From: Tom H. <th...@cy...> - 2007-09-10 02:30:47
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-09-10 03:15:02 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 256 tests, 27 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-09-10 02:23:45
|
Nightly build on lloyd ( x86_64, Fedora Core 3 ) started at 2007-09-10 03:05:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 293 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-09-10 02:23:43
|
Nightly build on dellow ( x86_64, Fedora 7 ) started at 2007-09-10 03:10:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) |
|
From: Tom H. <th...@cy...> - 2007-09-10 02:16:40
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-09-10 03:00:04 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 295 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: <js...@ac...> - 2007-09-10 00:16:59
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-09-10 02:00:01 CEST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |