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
(10) |
2
(3) |
3
(25) |
4
(8) |
|
5
(13) |
6
(8) |
7
(9) |
8
(10) |
9
(8) |
10
(13) |
11
(12) |
|
12
|
13
(7) |
14
(8) |
15
(11) |
16
(13) |
17
(13) |
18
(11) |
|
19
(13) |
20
(7) |
21
(1) |
22
(1) |
23
(1) |
24
(8) |
25
(15) |
|
26
(16) |
27
(20) |
28
(17) |
29
(10) |
30
(2) |
|
|
|
From: Christian B. <bor...@de...> - 2011-06-24 20:37:07
|
Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP1 gcc 4.3.4 on z196 (s390x) ) Started at 2011-06-24 22:10:01 CEST Ended at 2011-06-24 22:36:58 CEST 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 == 481 tests, 14 stderr failures, 0 stdout failures, 3 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcbreak (stderrB) gdbserver_tests/mcclean_after_fork (stderr) gdbserver_tests/mcclean_after_fork (stderrB) gdbserver_tests/mssnapshot (stderrB) none/tests/faultstatus (stderr) helgrind/tests/locked_vs_unlocked1_fwd (stderr) helgrind/tests/locked_vs_unlocked1_rev (stderr) helgrind/tests/locked_vs_unlocked2 (stderr) helgrind/tests/locked_vs_unlocked3 (stderr) helgrind/tests/pth_barrier3 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) ================================================= == 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 == 477 tests, 7 stderr failures, 0 stdout failures, 3 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcbreak (stderrB) gdbserver_tests/mcclean_after_fork (stderr) gdbserver_tests/mcclean_after_fork (stderrB) gdbserver_tests/mssnapshot (stderrB) none/tests/faultstatus (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Jun 24 22:23:51 2011 --- new.short Fri Jun 24 22:36:58 2011 *************** *** 8,10 **** ! == 477 tests, 7 stderr failures, 0 stdout failures, 3 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcbreak (stderrB) --- 8,10 ---- ! == 481 tests, 14 stderr failures, 0 stdout failures, 3 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcbreak (stderrB) *************** *** 14,16 **** --- 14,23 ---- none/tests/faultstatus (stderr) + helgrind/tests/locked_vs_unlocked1_fwd (stderr) + helgrind/tests/locked_vs_unlocked1_rev (stderr) + helgrind/tests/locked_vs_unlocked2 (stderr) + helgrind/tests/locked_vs_unlocked3 (stderr) + helgrind/tests/pth_barrier3 (stderr) helgrind/tests/tc06_two_races_xml (stderr) + helgrind/tests/tc18_semabuse (stderr) + helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: Christian B. <bor...@de...> - 2011-06-24 20:30:53
|
Nightly build on fedora390 ( Fedora 13/14/15 mix with gcc 3.5.3 on z196 (s390x) ) Started at 2011-06-24 22:10:01 CEST Ended at 2011-06-24 22:30:06 CEST 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 == 481 tests, 13 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcclean_after_fork (stderr) helgrind/tests/locked_vs_unlocked1_fwd (stderr) helgrind/tests/locked_vs_unlocked1_rev (stderr) helgrind/tests/locked_vs_unlocked2 (stderr) helgrind/tests/locked_vs_unlocked3 (stderr) helgrind/tests/pth_barrier3 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) ================================================= == 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 == 477 tests, 7 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcclean_after_fork (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc23_bogus_condwait (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Jun 24 22:20:07 2011 --- new.short Fri Jun 24 22:30:06 2011 *************** *** 8,12 **** ! == 477 tests, 7 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcclean_after_fork (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) --- 8,18 ---- ! == 481 tests, 13 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == gdbserver_tests/mcclean_after_fork (stderr) + helgrind/tests/locked_vs_unlocked1_fwd (stderr) + helgrind/tests/locked_vs_unlocked1_rev (stderr) + helgrind/tests/locked_vs_unlocked2 (stderr) + helgrind/tests/locked_vs_unlocked3 (stderr) + helgrind/tests/pth_barrier3 (stderr) helgrind/tests/tc06_two_races_xml (stderr) + helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) |
|
From: <sv...@va...> - 2011-06-24 18:31:01
|
Author: sewardj
Date: 2011-06-24 19:26:11 +0100 (Fri, 24 Jun 2011)
New Revision: 11829
Log:
Fix #undefs that are inconsistent with those further up the file,
as spotted by Michael Meeks.
Modified:
trunk/include/valgrind.h
Modified: trunk/include/valgrind.h
===================================================================
--- trunk/include/valgrind.h 2011-06-24 18:23:42 UTC (rev 11828)
+++ trunk/include/valgrind.h 2011-06-24 18:26:11 UTC (rev 11829)
@@ -5292,13 +5292,16 @@
addr, buf64, 0, 0, 0)
+#undef PLAT_ppc64_aix5
+#undef PLAT_ppc32_aix5
+#undef PLAT_x86_darwin
+#undef PLAT_amd64_darwin
+#undef PLAT_x86_win32
#undef PLAT_x86_linux
#undef PLAT_amd64_linux
#undef PLAT_ppc32_linux
#undef PLAT_ppc64_linux
#undef PLAT_arm_linux
#undef PLAT_s390x_linux
-#undef PLAT_ppc32_aix5
-#undef PLAT_ppc64_aix5
#endif /* __VALGRIND_H */
|
|
From: <sv...@va...> - 2011-06-24 18:28:33
|
Author: sewardj
Date: 2011-06-24 19:23:42 +0100 (Fri, 24 Jun 2011)
New Revision: 11828
Log:
Documentation updates for Helgrind.
Modified:
trunk/NEWS
trunk/helgrind/docs/hg-manual.xml
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-06-24 16:03:32 UTC (rev 11827)
+++ trunk/NEWS 2011-06-24 18:23:42 UTC (rev 11828)
@@ -6,6 +6,23 @@
on 64-bit targets.
- new variant --smc-check=all-non-file
+- hg: performance improvements and memory use reductions, particularly
+ for large, long running applications which perform many synch events.
+
+ showing of locksets for both threads involved in a race
+
+ general improvement of formatting/clarity of error messages
+
+ add facilities and documentation regarding annotation of thread safe
+ reference counted C++ classes
+
+ new flag --check-stack-refs=no|yes [yes], to disable race checking
+ on thread stacks (performance hack)
+
+ new flag --free-is-write=no|yes [no], to enable detection of races
+ where one thread accesses heap memory but another one frees it,
+ without any coordinating synchronisation event
+
* IBM z/Architecture (s390x) running Linux
Valgrind can analyse 64-bit programs running on z/Architecture.
Most user space instructions up to and including z10 are supported.
Modified: trunk/helgrind/docs/hg-manual.xml
===================================================================
--- trunk/helgrind/docs/hg-manual.xml 2011-06-24 16:03:32 UTC (rev 11827)
+++ trunk/helgrind/docs/hg-manual.xml 2011-06-24 18:23:42 UTC (rev 11828)
@@ -53,15 +53,16 @@
<para>Helgrind is aware of all the pthread abstractions and tracks
their effects as accurately as it can. On x86 and amd64 platforms, it
understands and partially handles implicit locking arising from the
-use of the LOCK instruction prefix.
+use of the LOCK instruction prefix. On PowerPC/POWER and ARM
+platforms, it partially handles implicit locking arising from
+load-linked and store-conditional instruction pairs.
</para>
<para>Helgrind works best when your application uses only the POSIX
pthreads API. However, if you want to use custom threading
primitives, you can describe their behaviour to Helgrind using the
<varname>ANNOTATE_*</varname> macros defined
-in <varname>helgrind.h</varname>. This functionality was added in
-release 3.5.0 of Valgrind, and is considered experimental.</para>
+in <varname>helgrind.h</varname>.</para>
@@ -211,27 +212,38 @@
a cycle. The presence of a cycle indicates a potential deadlock involving
the locks in the cycle.</para>
-<para>In simple situations, where the cycle only contains two locks,
-Helgrind will show where the required order was established:</para>
+<para>In general, Helgrind will choose two locks involved in the cycle
+and show you how their acquisition ordering has become inconsistent.
+It does this by showing the program points that first defined the
+ordering, and the program points which later violated it. Here is a
+simple example involving just two locks:</para>
<programlisting><![CDATA[
-Thread #1: lock order "0x7FEFFFAB0 before 0x7FEFFFA80" violated
- at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388)
- by 0x40081F: main (tc13_laog1.c:24)
- Required order was established by acquisition of lock at 0x7FEFFFAB0
- at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388)
- by 0x400748: main (tc13_laog1.c:17)
- followed by a later acquisition of lock at 0x7FEFFFA80
- at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388)
- by 0x400773: main (tc13_laog1.c:18)
+Thread #1: lock order "0x7FF0006D0 before 0x7FF0006A0" violated
+
+Observed (incorrect) order is: acquisition of lock at 0x7FF0006A0
+ at 0x4C2BC62: pthread_mutex_lock (hg_intercepts.c:494)
+ by 0x400825: main (tc13_laog1.c:23)
+
+ followed by a later acquisition of lock at 0x7FF0006D0
+ at 0x4C2BC62: pthread_mutex_lock (hg_intercepts.c:494)
+ by 0x400853: main (tc13_laog1.c:24)
+
+Required order was established by acquisition of lock at 0x7FF0006D0
+ at 0x4C2BC62: pthread_mutex_lock (hg_intercepts.c:494)
+ by 0x40076D: main (tc13_laog1.c:17)
+
+ followed by a later acquisition of lock at 0x7FF0006A0
+ at 0x4C2BC62: pthread_mutex_lock (hg_intercepts.c:494)
+ by 0x40079B: main (tc13_laog1.c:18)
]]></programlisting>
<para>When there are more than two locks in the cycle, the error is
equally serious. However, at present Helgrind does not show the locks
-involved, so as to avoid flooding you with information. That could be
-fixed in future. For example, here is an example involving a cycle
-of five locks from a naive implementation the famous Dining
-Philosophers problem
+involved, sometimes because it that information is not available, but
+also so as to avoid flooding you with information. For example, here
+is an example involving a cycle of five locks from a naive
+implementation the famous Dining Philosophers problem
(see <computeroutput>helgrind/tests/tc14_laog_dinphils.c</computeroutput>).
In this case Helgrind has detected that all 5 philosophers could
simultaneously pick up their left fork and then deadlock whilst
@@ -239,11 +251,15 @@
<programlisting><![CDATA[
Thread #6: lock order "0x6010C0 before 0x601160" violated
- at 0x4C23C91: pthread_mutex_lock (hg_intercepts.c:388)
- by 0x4007C0: dine (tc14_laog_dinphils.c:19)
- by 0x4C25DF7: mythread_wrapper (hg_intercepts.c:178)
- by 0x4E2F09D: start_thread (in /lib64/libpthread-2.5.so)
- by 0x51054CC: clone (in /lib64/libc-2.5.so)
+
+Observed (incorrect) order is: acquisition of lock at 0x601160
+ (stack unavailable)
+
+ followed by a later acquisition of lock at 0x6010C0
+ at 0x4C2BC62: pthread_mutex_lock (hg_intercepts.c:494)
+ by 0x4007DE: dine (tc14_laog_dinphils.c:19)
+ by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:219)
+ by 0x4E369C9: start_thread (pthread_create.c:300)
]]></programlisting>
</sect1>
@@ -312,14 +328,18 @@
by 0x400605: main (simple_race.c:12)
Possible data race during read of size 4 at 0x601038 by thread #1
+Locks held: none
at 0x400606: main (simple_race.c:13)
- This conflicts with a previous write of size 4 by thread #2
+
+This conflicts with a previous write of size 4 by thread #2
+Locks held: none
at 0x4005DC: child_fn (simple_race.c:6)
by 0x4C29AFF: mythread_wrapper (hg_intercepts.c:194)
by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so)
by 0x511C0CC: clone (in /lib64/libc-2.8.so)
- Location 0x601038 is 0 bytes inside global var "var"
- declared at simple_race.c:3
+
+Location 0x601038 is 0 bytes inside global var "var"
+declared at simple_race.c:3
]]></programlisting>
<para>This is quite a lot of detail for an apparently simple error.
@@ -348,7 +368,10 @@
threads.</para>
<para>By examining your program at the two locations, you should be
able to get at least some idea of what the root cause of the
- problem is.</para>
+ problem is. For each location, Helgrind shows the set of locks
+ held at the time of the access. This often makes it clear which
+ thread, if any, failed to take a required lock. In this example
+ neither thread holds a lock during the access.</para>
</listitem>
<listitem>
<para>For races which occur on global or stack variables, Helgrind
@@ -600,17 +623,21 @@
by 0x4008F2: main (tc21_pthonce.c:86)
Possible data race during read of size 4 at 0x601070 by thread #3
+Locks held: none
at 0x40087A: child (tc21_pthonce.c:74)
by 0x4C29AFF: mythread_wrapper (hg_intercepts.c:194)
by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so)
by 0x511C0CC: clone (in /lib64/libc-2.8.so)
- This conflicts with a previous write of size 4 by thread #2
+
+This conflicts with a previous write of size 4 by thread #2
+Locks held: none
at 0x400883: child (tc21_pthonce.c:74)
by 0x4C29AFF: mythread_wrapper (hg_intercepts.c:194)
by 0x4E3403F: start_thread (in /lib64/libpthread-2.8.so)
by 0x511C0CC: clone (in /lib64/libc-2.8.so)
- Location 0x601070 is 0 bytes inside local var "unprotected2"
- declared at tc21_pthonce.c:51, in frame #0 of thread 3
+
+Location 0x601070 is 0 bytes inside local var "unprotected2"
+declared at tc21_pthonce.c:51, in frame #0 of thread 3
]]></programlisting>
<para>Helgrind first announces the creation points of any threads
@@ -656,8 +683,9 @@
<listitem><para>Perhaps the location was intended to be protected by
a mutex? If so, you need to lock and unlock the mutex at both
access points, even if one of the accesses is reported to be a read.
- Did you perhaps forget the locking at one or other of the
- accesses?</para>
+ Did you perhaps forget the locking at one or other of the accesses?
+ To help you do this, Helgrind shows the set of locks held by each
+ threads at the time they accessed the raced-on location.</para>
</listitem>
<listitem><para>Alternatively, perhaps you intended to use a some
other scheme to make it safe, such as signalling on a condition
@@ -763,6 +791,74 @@
failures with more recent versions.</para>
</listitem>
</itemizedlist>
+
+ <para>If you must implement your own threading primitives, there
+ are a set of client request macros
+ in <computeroutput>helgrind.h</computeroutput> to help you
+ describe your primitives to Helgrind. You should be able to
+ mark up mutexes, condition variables, etc, without difficulty.
+ </para>
+ <para>
+ It is also possible to mark up the effects of thread-safe
+ reference counting using the
+ <computeroutput>ANNOTATE_HAPPENS_BEFORE</computeroutput>,
+ <computeroutput>ANNOTATE_HAPPENS_AFTER</computeroutput> and
+ <computeroutput>ANNOTATE_HAPPENS_BEFORE_FORGET_ALL</computeroutput>,
+ macros. Thread-safe reference counting using an atomically
+ incremented/decremented refcount variable causes Helgrind
+ problems because a one-to-zero transition of the reference count
+ means the accessing thread has exclusive ownership of the
+ associated resource (normally, a C++ object) and can therefore
+ access it (normally, to run its destructor) without locking.
+ Helgrind doesn't understand this, and markup is essential to
+ avoid false positives.
+ </para>
+
+ <para>
+ Here are recommended guidelines for marking up thread safe
+ reference counting in C++. You only need to mark up your
+ release methods -- the ones which decrement the reference count.
+ Given a class like this:
+ </para>
+
+<programlisting><![CDATA[
+class MyClass {
+ unsigned int mRefCount;
+
+ void Release ( void ) {
+ unsigned int newCount = atomic_decrement(&mRefCount);
+ if (newCount == 0) {
+ delete this;
+ }
+ }
+}
+]]></programlisting>
+
+ <para>
+ the release method should be marked up as follows:
+ </para>
+
+<programlisting><![CDATA[
+ void Release ( void ) {
+ unsigned int newCount = atomic_decrement(&mRefCount);
+ if (newCount == 0) {
+ ANNOTATE_HAPPENS_AFTER(&mRefCount);
+ ANNOTATE_HAPPENS_BEFORE_FORGET_ALL(&mRefCount);
+ delete this;
+ } else {
+ ANNOTATE_HAPPENS_BEFORE(&mRefCount);
+ }
+ }
+]]></programlisting>
+
+ <para>
+ There are a number of complex, mostly-theoretical objections to
+ this scheme. From a theoretical standpoint it appears to be
+ impossible to devise a markup scheme which is completely correct
+ in the sense of guaranteeing to remove all false races. The
+ proposed scheme however works well in practice.
+ </para>
+
</listitem>
<listitem>
@@ -1058,6 +1154,24 @@
</listitem>
</varlistentry>
+ <varlistentry id="opt.check-stack-refs"
+ xreflabel="--check-stack-refs">
+ <term>
+ <option><![CDATA[--check-stack-refs=no|yes
+ [default: yes] ]]></option>
+ </term>
+ <listitem>
+ <para>
+ By default Helgrind checks all data memory accesses made by your
+ program. This flag enables you to skip checking for accesses
+ to thread stacks (local variables). This can improve
+ performance, but comes at the cost of missing races on
+ stack-allocated data.
+ </para>
+ </listitem>
+ </varlistentry>
+
+
</variablelist>
<!-- end of xi:include in the manpage -->
|
|
From: <sv...@va...> - 2011-06-24 16:08:23
|
Author: sewardj
Date: 2011-06-24 17:03:32 +0100 (Fri, 24 Jun 2011)
New Revision: 11827
Log:
Add tests for displaying of locks held by threads in races.
Added:
trunk/helgrind/tests/locked_vs_unlocked1.c
trunk/helgrind/tests/locked_vs_unlocked1_fwd.stderr.exp
trunk/helgrind/tests/locked_vs_unlocked1_fwd.stdout.exp
trunk/helgrind/tests/locked_vs_unlocked1_fwd.vgtest
trunk/helgrind/tests/locked_vs_unlocked1_rev.stderr.exp
trunk/helgrind/tests/locked_vs_unlocked1_rev.stdout.exp
trunk/helgrind/tests/locked_vs_unlocked1_rev.vgtest
trunk/helgrind/tests/locked_vs_unlocked2.c
trunk/helgrind/tests/locked_vs_unlocked2.stderr.exp
trunk/helgrind/tests/locked_vs_unlocked2.stdout.exp
trunk/helgrind/tests/locked_vs_unlocked2.vgtest
trunk/helgrind/tests/locked_vs_unlocked3.c
trunk/helgrind/tests/locked_vs_unlocked3.stderr.exp
trunk/helgrind/tests/locked_vs_unlocked3.stdout.exp
trunk/helgrind/tests/locked_vs_unlocked3.vgtest
Modified:
trunk/helgrind/tests/Makefile.am
Modified: trunk/helgrind/tests/Makefile.am
===================================================================
--- trunk/helgrind/tests/Makefile.am 2011-06-24 12:55:25 UTC (rev 11826)
+++ trunk/helgrind/tests/Makefile.am 2011-06-24 16:03:32 UTC (rev 11827)
@@ -21,6 +21,18 @@
hg05_race2.vgtest hg05_race2.stdout.exp hg05_race2.stderr.exp \
hg06_readshared.vgtest hg06_readshared.stdout.exp \
hg06_readshared.stderr.exp \
+ locked_vs_unlocked1_fwd.vgtest \
+ locked_vs_unlocked1_fwd.stderr.exp \
+ locked_vs_unlocked1_fwd.stdout.exp \
+ locked_vs_unlocked1_rev.vgtest \
+ locked_vs_unlocked1_rev.stderr.exp \
+ locked_vs_unlocked1_rev.stdout.exp \
+ locked_vs_unlocked2.vgtest \
+ locked_vs_unlocked2.stderr.exp \
+ locked_vs_unlocked2.stdout.exp \
+ locked_vs_unlocked3.vgtest \
+ locked_vs_unlocked3.stderr.exp \
+ locked_vs_unlocked3.stdout.exp \
pth_barrier1.vgtest pth_barrier1.stdout.exp pth_barrier1.stderr.exp \
pth_barrier2.vgtest pth_barrier2.stdout.exp pth_barrier2.stderr.exp \
pth_barrier3.vgtest pth_barrier3.stdout.exp pth_barrier3.stderr.exp \
@@ -84,6 +96,9 @@
hg04_race \
hg05_race2 \
hg06_readshared \
+ locked_vs_unlocked1 \
+ locked_vs_unlocked2 \
+ locked_vs_unlocked3 \
tc01_simple_race \
tc02_simple_tls \
tc03_re_excl \
Added: trunk/helgrind/tests/locked_vs_unlocked1.c
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked1.c (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked1.c 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,50 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Test of the mechanism for showing all locks held by a thread -- one
+ thread has a lock, the other doesn't. Running w/ command line args
+ switches the has/has-not thread around, so as to test lockset
+ retention in both the history mechanism and the primary errors. */
+
+pthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER;
+
+int x = 0;
+
+void* child_fn ( void* arg )
+{
+ if (arg) pthread_mutex_lock(&mx);
+ x = 1;
+ if (arg) pthread_mutex_unlock(&mx);
+ return NULL;
+}
+
+int main ( int argc, char** argv )
+{
+ int sw = argc > 1;
+ pthread_t child1, child2;
+
+ if (pthread_create(&child1, NULL, child_fn, (void*)(long)(sw ? 0 : 1))) {
+ perror("pthread_create1");
+ exit(1);
+ }
+ sleep(1); /* ensure repeatable results */
+ if (pthread_create(&child2, NULL, child_fn, (void*)(long)(sw ? 1 : 0))) {
+ perror("pthread_create1");
+ exit(1);
+ }
+
+ if (pthread_join(child1, NULL)) {
+ perror("pthread join1");
+ exit(1);
+ }
+
+ if (pthread_join(child2, NULL)) {
+ perror("pthread join2");
+ exit(1);
+ }
+
+ return 0;
+}
Added: trunk/helgrind/tests/locked_vs_unlocked1_fwd.stderr.exp
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked1_fwd.stderr.exp (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked1_fwd.stderr.exp 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,34 @@
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+
+----------------------------------------------------------------
+
+Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
+ by 0x........: child_fn (locked_vs_unlocked1.c:18)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+Locks held: none
+ at 0x........: child_fn (locked_vs_unlocked1.c:19)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
+This conflicts with a previous write of size 4 by thread #x
+Locks held: 1, at address 0x........
+ at 0x........: child_fn (locked_vs_unlocked1.c:19)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
Added: trunk/helgrind/tests/locked_vs_unlocked1_fwd.stdout.exp
===================================================================
Added: trunk/helgrind/tests/locked_vs_unlocked1_fwd.vgtest
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked1_fwd.vgtest (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked1_fwd.vgtest 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,2 @@
+prog: locked_vs_unlocked1
+vgopts: -q --num-callers=3
Added: trunk/helgrind/tests/locked_vs_unlocked1_rev.stderr.exp
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked1_rev.stderr.exp (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked1_rev.stderr.exp 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,34 @@
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+
+----------------------------------------------------------------
+
+Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
+ by 0x........: child_fn (locked_vs_unlocked1.c:18)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
+Possible data race during write of size 4 at 0x........ by thread #x
+Locks held: 1, at address 0x........
+ at 0x........: child_fn (locked_vs_unlocked1.c:19)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
+This conflicts with a previous write of size 4 by thread #x
+Locks held: none
+ at 0x........: child_fn (locked_vs_unlocked1.c:19)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
Added: trunk/helgrind/tests/locked_vs_unlocked1_rev.stdout.exp
===================================================================
Added: trunk/helgrind/tests/locked_vs_unlocked1_rev.vgtest
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked1_rev.vgtest (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked1_rev.vgtest 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,3 @@
+prog: locked_vs_unlocked1
+args: x
+vgopts: -q --num-callers=3
Added: trunk/helgrind/tests/locked_vs_unlocked2.c
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked2.c (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked2.c 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,73 @@
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <unistd.h>
+
+/* Test of the mechanism for showing all locks held by a thread. Test
+ the case where the earlier thread held, at the time of the access,
+ some locks, at least one of which is deleted by the time the second
+ access (the race) happens. This causes problems for Helgrind's
+ error reporting mechanism in that it can no longer show the deleted
+ lock in the error message.x */
+
+pthread_mutex_t mx1a;
+pthread_mutex_t mx1b;
+pthread_mutex_t mx2a;
+pthread_mutex_t mx2b;
+
+int x = 0;
+
+void* child_fn1 ( void* arg )
+{
+ int r;
+ // We are the first-accessing thread. Take and release two locks
+ // and then destroy one of them.
+ r= pthread_mutex_lock(&mx1a); assert(!r);
+ r= pthread_mutex_lock(&mx1b); assert(!r);
+ x = 1;
+ r= pthread_mutex_unlock(&mx1b); assert(!r);
+ r= pthread_mutex_unlock(&mx1a); assert(!r);
+ r= pthread_mutex_destroy(&mx1a); assert(!r);
+ sleep(1);
+ return NULL;
+}
+
+void* child_fn2 ( void* arg )
+{
+ int r;
+ // We are the second-accessing thread. Take and release
+ // our two locks, but don't otherwise mess with them.
+ sleep(1);
+ r= pthread_mutex_lock(&mx2a); assert(!r);
+ r= pthread_mutex_lock(&mx2b); assert(!r);
+ x = 1;
+ r= pthread_mutex_unlock(&mx2b); assert(!r);
+ r= pthread_mutex_unlock(&mx2a); assert(!r);
+ return NULL;
+}
+
+int main ( int argc, char** argv )
+{
+ pthread_t child1, child2;
+ int r;
+
+ r= pthread_mutex_init(&mx1a, NULL); assert(!r);
+ r= pthread_mutex_init(&mx1b, NULL); assert(!r);
+ r= pthread_mutex_init(&mx2a, NULL); assert(!r);
+ r= pthread_mutex_init(&mx2b, NULL); assert(!r);
+
+ r= pthread_create(&child2, NULL, child_fn2, NULL); assert(!r);
+ r= pthread_create(&child1, NULL, child_fn1, NULL); assert(!r);
+
+ r= pthread_join(child1, NULL); assert(!r);
+ r= pthread_join(child2, NULL); assert(!r);
+
+ // don't destroy mx1a; it's already destroyed.
+ r= pthread_mutex_destroy(&mx1b); assert(!r);
+ r= pthread_mutex_destroy(&mx2a); assert(!r);
+ r= pthread_mutex_destroy(&mx2b); assert(!r);
+
+ return 0;
+}
Added: trunk/helgrind/tests/locked_vs_unlocked2.stderr.exp
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked2.stderr.exp (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked2.stderr.exp 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,40 @@
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+
+----------------------------------------------------------------
+
+Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (locked_vs_unlocked2.c:58)
+
+Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (locked_vs_unlocked2.c:59)
+
+Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (locked_vs_unlocked2.c:57)
+
+Possible data race during write of size 4 at 0x........ by thread #x
+Locks held: 2, at addresses 0x........ 0x........
+ at 0x........: child_fn2 (locked_vs_unlocked2.c:45)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
+This conflicts with a previous write of size 4 by thread #x
+Locks held: 2, at address 0x........ (and 1 that can't be shown)
+ at 0x........: child_fn1 (locked_vs_unlocked2.c:29)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
Added: trunk/helgrind/tests/locked_vs_unlocked2.stdout.exp
===================================================================
Added: trunk/helgrind/tests/locked_vs_unlocked2.vgtest
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked2.vgtest (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked2.vgtest 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,2 @@
+prog: locked_vs_unlocked2
+vgopts: -q --num-callers=3
Added: trunk/helgrind/tests/locked_vs_unlocked3.c
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked3.c (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked3.c 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,62 @@
+
+/* Needed for older glibcs (2.3 and older, at least) who don't
+ otherwise "know" about pthread_rwlock_anything or about
+ PTHREAD_MUTEX_RECURSIVE (amongst things). */
+#define _GNU_SOURCE 1
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <unistd.h>
+
+/* Test of the mechanism for showing all locks held by a thread. This
+ is like locked_vs_unlocked.c, except that it uses a recursively
+ lockable lock, and one thread holds the lock more than once. Point
+ is to check that the lock showing mechanism shows the
+ lock-number-of-times-held count. */
+
+pthread_mutex_t mx;
+
+int x = 0;
+
+void* child_fn1 ( void* arg )
+{
+ int r;
+ r= pthread_mutex_lock(&mx); assert(!r);
+ r= pthread_mutex_lock(&mx); assert(!r);
+ x = 1;
+ r= pthread_mutex_unlock(&mx); assert(!r);
+ r= pthread_mutex_unlock(&mx); assert(!r);
+ sleep(1);
+ return NULL;
+}
+
+void* child_fn2 ( void* arg )
+{
+ sleep(1);
+ x = 1;
+ return NULL;
+}
+
+int main ( int argc, char** argv )
+{
+ int r;
+ pthread_t child1, child2;
+ pthread_mutexattr_t attr;
+ r = pthread_mutexattr_init( &attr );
+ assert(!r);
+ r = pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE );
+ assert(!r);
+ r= pthread_mutex_init(&mx, &attr); assert(!r);
+
+ r= pthread_create(&child2, NULL, child_fn2, NULL); assert(!r);
+ r= pthread_create(&child1, NULL, child_fn1, NULL); assert(!r);
+
+ r= pthread_join(child1, NULL); assert(!r);
+ r= pthread_join(child2, NULL); assert(!r);
+
+ r= pthread_mutex_destroy(&mx); assert(!r);
+
+ return 0;
+}
Added: trunk/helgrind/tests/locked_vs_unlocked3.stderr.exp
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked3.stderr.exp (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked3.stderr.exp 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,32 @@
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+
+---Thread-Announcement------------------------------------------
+
+Thread #x was created
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+
+----------------------------------------------------------------
+
+Lock at 0x........ was first observed
+ at 0x........: pthread_mutex_init (hg_intercepts.c:...)
+ by 0x........: main (locked_vs_unlocked3.c:51)
+
+Possible data race during write of size 4 at 0x........ by thread #x
+Locks held: none
+ at 0x........: child_fn2 (locked_vs_unlocked3.c:38)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
+This conflicts with a previous write of size 4 by thread #x
+Locks held: 1, at address 0x........
+ at 0x........: child_fn1 (locked_vs_unlocked3.c:28)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
Added: trunk/helgrind/tests/locked_vs_unlocked3.stdout.exp
===================================================================
Added: trunk/helgrind/tests/locked_vs_unlocked3.vgtest
===================================================================
--- trunk/helgrind/tests/locked_vs_unlocked3.vgtest (rev 0)
+++ trunk/helgrind/tests/locked_vs_unlocked3.vgtest 2011-06-24 16:03:32 UTC (rev 11827)
@@ -0,0 +1,2 @@
+prog: locked_vs_unlocked3
+vgopts: -q --num-callers=3
|
|
From: <sv...@va...> - 2011-06-24 13:00:16
|
Author: sewardj
Date: 2011-06-24 13:55:25 +0100 (Fri, 24 Jun 2011)
New Revision: 11826
Log:
Fix up the remaining .stderr.exp-s following r11824 (merge of
branches/HGDEV2), and delete some redundant ones
Removed:
trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc23-amd64
trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-x86
trunk/helgrind/tests/tc18_semabuse.stderr.exp-glibc25-amd64
trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc25-amd64
Modified:
trunk/helgrind/tests/Makefile.am
trunk/helgrind/tests/pth_barrier3.stderr.exp
trunk/helgrind/tests/pth_barrier3.vgtest
trunk/helgrind/tests/tc06_two_races_xml.stderr.exp
trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-amd64
trunk/helgrind/tests/tc18_semabuse.stderr.exp-glibc28-amd64
trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc27-amd64
Modified: trunk/helgrind/tests/Makefile.am
===================================================================
--- trunk/helgrind/tests/Makefile.am 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/Makefile.am 2011-06-24 12:55:25 UTC (rev 11826)
@@ -44,9 +44,7 @@
tc07_hbl1.vgtest tc07_hbl1.stdout.exp tc07_hbl1.stderr.exp \
tc08_hbl2.vgtest tc08_hbl2.stdout.exp tc08_hbl2.stderr.exp \
tc09_bad_unlock.vgtest tc09_bad_unlock.stdout.exp \
- tc09_bad_unlock.stderr.exp-glibc23-amd64 \
tc09_bad_unlock.stderr.exp-glibc25-amd64 \
- tc09_bad_unlock.stderr.exp-glibc25-x86 \
tc10_rec_lock.vgtest tc10_rec_lock.stdout.exp tc10_rec_lock.stderr.exp \
tc11_XCHG.vgtest tc11_XCHG.stdout.exp tc11_XCHG.stderr.exp \
tc12_rwl_trivial.vgtest tc12_rwl_trivial.stdout.exp \
@@ -62,12 +60,10 @@
tc17_sembar.vgtest tc17_sembar.stdout.exp \
tc17_sembar.stderr.exp \
tc18_semabuse.vgtest tc18_semabuse.stdout.exp \
- tc18_semabuse.stderr.exp-glibc25-amd64 \
tc18_semabuse.stderr.exp-glibc28-amd64 \
tc19_shadowmem.vgtest tc19_shadowmem.stdout.exp \
tc19_shadowmem.stderr.exp \
tc20_verifywrap.vgtest tc20_verifywrap.stdout.exp \
- tc20_verifywrap.stderr.exp-glibc25-amd64 \
tc20_verifywrap.stderr.exp-glibc27-amd64 \
tc21_pthonce.vgtest tc21_pthonce.stdout.exp tc21_pthonce.stderr.exp \
tc22_exit_w_lock.vgtest tc22_exit_w_lock.stdout.exp \
Modified: trunk/helgrind/tests/pth_barrier3.stderr.exp
===================================================================
--- trunk/helgrind/tests/pth_barrier3.stderr.exp 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/pth_barrier3.stderr.exp 2011-06-24 12:55:25 UTC (rev 11826)
@@ -1,24 +1,32 @@
+---Thread-Announcement------------------------------------------
+
Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: barriers_and_races (pth_barrier.c:84)
- by 0x........: main (pth_barrier.c:107)
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+---Thread-Announcement------------------------------------------
+
Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: barriers_and_races (pth_barrier.c:84)
- by 0x........: main (pth_barrier.c:107)
+ at 0x........: clone (in /...libc...)
+ by 0x........: pthread_create@@GLIBC_2.2.5 (in /...libpthread...)
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+----------------------------------------------------------------
+
Possible data race during write of size 4 at 0x........ by thread #x
+Locks held: none
at 0x........: threadfunc (pth_barrier.c:57)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- This conflicts with a previous write of size 4 by thread #x
+
+This conflicts with a previous write of size 4 by thread #x
+Locks held: none
at 0x........: threadfunc (pth_barrier.c:57)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Address 0x........ is 0 bytes inside a block of size 4 alloc'd
+
+Address 0x........ is 0 bytes inside a block of size 4 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: barriers_and_races (pth_barrier.c:72)
by 0x........: main (pth_barrier.c:107)
Modified: trunk/helgrind/tests/pth_barrier3.vgtest
===================================================================
--- trunk/helgrind/tests/pth_barrier3.vgtest 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/pth_barrier3.vgtest 2011-06-24 12:55:25 UTC (rev 11826)
@@ -1,4 +1,4 @@
prereq: test -e bar_trivial
prog: ../../drd/tests/pth_barrier
args: 32 1 1
-vgopts: -q
+vgopts: -q --num-callers=3
Modified: trunk/helgrind/tests/tc06_two_races_xml.stderr.exp
===================================================================
--- trunk/helgrind/tests/tc06_two_races_xml.stderr.exp 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/tc06_two_races_xml.stderr.exp 2011-06-24 12:55:25 UTC (rev 11826)
@@ -40,16 +40,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>do_clone</fn>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<fn>pthread_create@@GLIBC_2.2.5</fn>
+ <dir>...</dir>
+ <file>createthread.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
@@ -121,11 +122,12 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
- <obj>...</obj>
- <fn>clone</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -175,11 +177,12 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
- <obj>...</obj>
- <fn>clone</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -229,11 +232,12 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
- <obj>...</obj>
- <fn>clone</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
@@ -283,11 +287,12 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
- <obj>...</obj>
- <fn>clone</fn>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
Deleted: trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc23-amd64
===================================================================
--- trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc23-amd64 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc23-amd64 2011-06-24 12:55:25 UTC (rev 11826)
@@ -1,81 +0,0 @@
-
-Thread #x is the program's root thread
-
-Thread #x unlocked a not-locked lock at 0x........
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- 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 (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:23)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:35)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x unlocked lock at 0x........ currently held by thread #x
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: child_fn (tc09_bad_unlock.c:11)
- by 0x........: mythread_wrapper (hg_intercepts.c:...)
- ...
- Lock at 0x........ was first observed
- at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x unlocked an invalid lock at 0x........
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x 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 (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x unlocked a not-locked lock at 0x........
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- 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 (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:23)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:35)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread #x unlocked lock at 0x........ currently held by thread #x
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: child_fn (tc09_bad_unlock.c:11)
- by 0x........: mythread_wrapper (hg_intercepts.c:...)
- ...
- Lock at 0x........ was first observed
- at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread #x unlocked an invalid lock at 0x........
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread #x 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 (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-
-ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0)
Modified: trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-amd64
===================================================================
--- trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-amd64 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-amd64 2011-06-24 12:55:25 UTC (rev 11826)
@@ -1,6 +1,10 @@
+---Thread-Announcement------------------------------------------
+
Thread #x is the program's root thread
+----------------------------------------------------------------
+
Thread #x unlocked a not-locked lock at 0x........
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:27)
@@ -10,12 +14,16 @@
by 0x........: nearly_main (tc09_bad_unlock.c:23)
by 0x........: main (tc09_bad_unlock.c:49)
+---Thread-Announcement------------------------------------------
+
Thread #x was created
...
by 0x........: pthread_create@* (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:35)
by 0x........: main (tc09_bad_unlock.c:49)
+----------------------------------------------------------------
+
Thread #x unlocked lock at 0x........ currently held by thread #x
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: child_fn (tc09_bad_unlock.c:11)
@@ -26,11 +34,15 @@
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:49)
+----------------------------------------------------------------
+
Thread #x unlocked an invalid lock at 0x........
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:49)
+----------------------------------------------------------------
+
Thread #x's call to pthread_mutex_unlock failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
@@ -38,6 +50,8 @@
by 0x........: main (tc09_bad_unlock.c:49)
---------------------
+----------------------------------------------------------------
+
Thread #x unlocked a not-locked lock at 0x........
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:27)
@@ -47,6 +61,8 @@
by 0x........: nearly_main (tc09_bad_unlock.c:23)
by 0x........: main (tc09_bad_unlock.c:49)
+----------------------------------------------------------------
+
Thread #x: Attempt to re-lock a non-recursive lock I already hold
at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:32)
@@ -56,17 +72,23 @@
by 0x........: nearly_main (tc09_bad_unlock.c:32)
by 0x........: main (tc09_bad_unlock.c:49)
+----------------------------------------------------------------
+
Thread #x: Bug in libpthread: recursive write lock granted on mutex/wrlock which does not support recursion
at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:32)
by 0x........: main (tc09_bad_unlock.c:50)
+---Thread-Announcement------------------------------------------
+
Thread #x was created
...
by 0x........: pthread_create@* (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:35)
by 0x........: main (tc09_bad_unlock.c:50)
+----------------------------------------------------------------
+
Thread #x unlocked lock at 0x........ currently held by thread #x
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: child_fn (tc09_bad_unlock.c:11)
@@ -77,17 +99,23 @@
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:49)
+----------------------------------------------------------------
+
Thread #x unlocked an invalid lock at 0x........
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
+----------------------------------------------------------------
+
Thread #x's call to pthread_mutex_unlock failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
+----------------------------------------------------------------
+
Thread #x: Exiting thread still holds 1 lock
...
Deleted: trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-x86
===================================================================
--- trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-x86 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/tc09_bad_unlock.stderr.exp-glibc25-x86 2011-06-24 12:55:25 UTC (rev 11826)
@@ -1,93 +0,0 @@
-
-Thread #x is the program's root thread
-
-Thread #x unlocked a not-locked lock at 0x........
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- 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 (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:23)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:35)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x unlocked lock at 0x........ currently held by thread #x
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: child_fn (tc09_bad_unlock.c:11)
- by 0x........: mythread_wrapper (hg_intercepts.c:...)
- ...
- Lock at 0x........ was first observed
- at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x unlocked an invalid lock at 0x........
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x 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 (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:49)
-
-Thread #x unlocked a not-locked lock at 0x........
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- 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 (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:23)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:35)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread #x unlocked lock at 0x........ currently held by thread #x
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: child_fn (tc09_bad_unlock.c:11)
- by 0x........: mythread_wrapper (hg_intercepts.c:...)
- ...
- Lock at 0x........ was first observed
- at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread #x unlocked an invalid lock at 0x........
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread #x 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 (hg_intercepts.c:...)
- 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)
Deleted: trunk/helgrind/tests/tc18_semabuse.stderr.exp-glibc25-amd64
===================================================================
--- trunk/helgrind/tests/tc18_semabuse.stderr.exp-glibc25-amd64 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/tc18_semabuse.stderr.exp-glibc25-amd64 2011-06-24 12:55:25 UTC (rev 11826)
@@ -1,15 +0,0 @@
-
-Thread #x is the program's root thread
-
-Thread #x's call to sem_init failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_init@* (hg_intercepts.c:...)
- by 0x........: main (tc18_semabuse.c:23)
-
-Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
- at 0x........: sem_wait_WRK (hg_intercepts.c:...)
- by 0x........: sem_wait (hg_intercepts.c:...)
- by 0x........: main (tc18_semabuse.c:34)
-
-
-ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Modified: trunk/helgrind/tests/tc18_semabuse.stderr.exp-glibc28-amd64
===================================================================
--- trunk/helgrind/tests/tc18_semabuse.stderr.exp-glibc28-amd64 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/tc18_semabuse.stderr.exp-glibc28-amd64 2011-06-24 12:55:25 UTC (rev 11826)
@@ -1,16 +1,24 @@
+---Thread-Announcement------------------------------------------
+
Thread #x is the program's root thread
+----------------------------------------------------------------
+
Thread #x's call to sem_init failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: sem_init@* (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:23)
+----------------------------------------------------------------
+
Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
at 0x........: sem_wait_WRK (hg_intercepts.c:...)
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
+----------------------------------------------------------------
+
Thread #x's call to sem_post failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: sem_post_WRK (hg_intercepts.c:...)
Deleted: trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc25-amd64
===================================================================
--- trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc25-amd64 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc25-amd64 2011-06-24 12:55:25 UTC (rev 11826)
@@ -1,155 +0,0 @@
-
-
-
------- This is output for >= glibc 2.4 ------
-
----------------- pthread_create/join ----------------
-
-Thread #x is the program's root thread
-
-Thread #x was created
- ...
- by 0x........: pthread_create@* (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:76)
-
-Possible data race during write of size 2 at 0x........ by thread #x
- at 0x........: main (tc20_verifywrap.c:78)
- This conflicts with a previous write of size 2 by thread #x
- at 0x........: racy_child (tc20_verifywrap.c:34)
- by 0x........: mythread_wrapper (hg_intercepts.c:...)
- ...
- Location 0x........ is 0 bytes inside global var "unprotected"
- declared at tc20_verifywrap.c:27
-
-Thread #x's call to pthread_join failed
- with error code 35 (EDEADLK: Resource deadlock would occur)
- at 0x........: pthread_join (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:83)
-
-
----------------- pthread_mutex_lock et al ----------------
-
-Thread #x's call to pthread_mutex_init failed
- with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint)
- at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:92)
-
-Thread #x: pthread_mutex_destroy of a locked mutex
- at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:102)
-
-Thread #x's call to pthread_mutex_destroy failed
- with error code 16 (EBUSY: Device or resource busy)
- at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:102)
-
-Thread #x's call to pthread_mutex_lock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:108)
-
-Thread #x's call to pthread_mutex_trylock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_trylock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:116)
-
-Thread #x's call to pthread_mutex_timedlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:121)
-
-Thread #x unlocked an invalid lock at 0x........
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:125)
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:125)
-
-
----------------- pthread_cond_wait et al ----------------
-
-Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:147)
-
-Thread #x's call to pthread_cond_wait failed
- with error code 1 (EPERM: Operation not permitted)
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:147)
-
-
-FIXME: can't figure out how to verify wrap of pthread_cond_signal
-
-
-FIXME: can't figure out how to verify wrap of pthread_broadcast_signal
-
-Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:165)
-
-Thread #x's call to pthread_cond_timedwait failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:165)
-
-
----------------- pthread_rwlock_* ----------------
-
-Thread #x unlocked a not-locked lock at 0x........
- at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:179)
- Lock at 0x........ was first observed
- at 0x........: pthread_rwlock_init (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:178)
-
-(1) no error on next line
-(2) no error on next line
-(3) ERROR on next line
-Thread #x unlocked a not-locked lock at 0x........
- at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:196)
- Lock at 0x........ was first observed
- at 0x........: pthread_rwlock_init (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:186)
-
-(4) no error on next line
-(5) no error on next line
-(6) no error on next line
-(7) no error on next line
-(8) ERROR on next line
-Thread #x unlocked a not-locked lock at 0x........
- at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:212)
- Lock at 0x........ was first observed
- at 0x........: pthread_rwlock_init (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:186)
-
-
----------------- sem_* ----------------
-
-Thread #x's call to sem_init failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_init@* (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:228)
-
-
-FIXME: can't figure out how to verify wrap of sem_destroy
-
-Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
- at 0x........: sem_wait_WRK (hg_intercepts.c:...)
- by 0x........: sem_wait (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:242)
-
-
-FIXME: can't figure out how to verify wrap of sem_post
-
-
------------- dealloc of mem holding locks ------------
-
-Thread #x: Exiting thread still holds 1 lock
- ...
-
-
-ERROR SUMMARY: 20 errors from 20 contexts (suppressed: 0 from 0)
Modified: trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc27-amd64
===================================================================
--- trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc27-amd64 2011-06-24 10:50:11 UTC (rev 11825)
+++ trunk/helgrind/tests/tc20_verifywrap.stderr.exp-glibc27-amd64 2011-06-24 12:55:25 UTC (rev 11826)
@@ -5,22 +5,34 @@
---------------- pthread_create/join ----------------
+---Thread-Announcement------------------------------------------
+
Thread #x is the program's root thread
+---Thread-Announcement------------------------------------------
+
Thread #x was created
...
by 0x........: pthread_create@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:76)
+----------------------------------------------------------------
+
Possible data race during write of size 2 at 0x........ by thread #x
+Locks held: none
at 0x........: main (tc20_verifywrap.c:78)
- This conflicts with a previous write of size 2 by thread #x
+
+This conflicts with a previous write of size 2 by thread #x
+Locks held: none
at 0x........: racy_child (tc20_verifywrap.c:34)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Location 0x........ is 0 bytes inside global var "unprotected"
- declared at tc20_verifywrap.c:27
+Location 0x........ is 0 bytes inside global var "unprotected"
+declared at tc20_verifywrap.c:27
+
+----------------------------------------------------------------
+
Thread #x's call to pthread_join failed
with error code 35 (EDEADLK: Resource deadlock would occur)
at 0x........: pthread_join (hg_intercepts.c:...)
@@ -29,39 +41,55 @@
---------------- pthread_mutex_lock et al ----------------
+----------------------------------------------------------------
+
Thread #x's call to pthread_mutex_init failed
with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint)
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:92)
+----------------------------------------------------------------
+
Thread #x: pthread_mutex_destroy of a locked mutex
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
+----------------------------------------------------------------
+
Thread #x's call to pthread_mutex_destroy failed
with error code 16 (EBUSY: Device or resource busy)
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
+----------------------------------------------------------------
+
Thread #x's call to pthread_mutex_lock failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:108)
+----------------------------------------------------------------
+
Thread #x's call to pthread_mutex_trylock failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: pthread_mutex_trylock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:116)
+----------------------------------------------------------------
+
Thread #x's call to pthread_mutex_timedlock failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:121)
+----------------------------------------------------------------
+
Thread #x unlocked an invalid lock at 0x........
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:125)
+----------------------------------------------------------------
+
Thread #x's call to pthread_mutex_unlock failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
@@ -70,28 +98,48 @@
---------------- pthread_cond_wait et al ----------------
+----------------------------------------------------------------
+
Thread #x: pthread_cond_{timed}wait called with un-held mutex
at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
+----------------------------------------------------------------
+
Thread #x's call to pthread_cond_wait failed
with error code 1 (EPERM: Operation not permitted)
at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
+----------------------------------------------------------------
+Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
+ at 0x........: pthread_cond_signal@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:152)
+
+
FIXME: can't figure out how to verify wrap of pthread_cond_signal
+----------------------------------------------------------------
+Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
+ at 0x........: pthread_cond_broadcast@* (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:158)
+
+
FIXME: can't figure out how to verify wrap of pthread_broadcast_signal
+----------------------------------------------------------------
+
Thread #x: pthread_cond_{timed}wait called with un-held mutex
at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:165)
+----------------------------------------------------------------
+
Thread #x's call to pthread_cond_timedwait failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
@@ -101,6 +149,8 @@
---------------- pthread_rwlock_* ----------------
+----------------------------------------------------------------
+
Thread #x unlocked a not-locked lock at 0x........
at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:179)
@@ -111,6 +161,8 @@
(1) no error on next line
(2) no error on next line
(3) ERROR on next line
+----------------------------------------------------------------
+
Thread #x unlocked a not-locked lock at 0x........
at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:196)
@@ -123,6 +175,8 @@
(6) no error on next line
(7) no error on next line
(8) ERROR on next line
+----------------------------------------------------------------
+
Thread #x unlocked a not-locked lock at 0x........
at 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:212)
@@ -133,6 +187,8 @@
---------------- sem_* ----------------
+----------------------------------------------------------------
+
Thread #x's call to sem_init failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: sem_init@* (hg_intercepts.c:...)
@@ -141,11 +197,15 @@
FIXME: can't figure out how to verify wrap of sem_destroy
+----------------------------------------------------------------
+
Thread #x: Bug in libpthread: sem_wait succeeded on semaphore without prior sem_post
at 0x........: sem_wait_WRK (hg_intercepts.c:...)
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:242)
+----------------------------------------------------------------
+
Thread #x's call to sem_post failed
with error code 22 (EINVAL: Invalid argument)
at 0x........: sem_post_WRK (hg_intercepts.c:...)
@@ -158,8 +218,10 @@
------------ dealloc of mem holding locks ------------
+----------------------------------------------------------------
+
Thread #x: Exiting thread still holds 1 lock
...
-ERROR SUMMARY: 21 errors from 21 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
|
|
From: <sv...@va...> - 2011-06-24 10:55:03
|
Author: sewardj Date: 2011-06-24 11:50:11 +0100 (Fri, 24 Jun 2011) New Revision: 11825 Log: Fix a bunch of helgrind .stderr.exp-s following r11824 (merge of branches/HGDEV2) Modified: trunk/helgrind/tests/annotate_rwlock.stderr.exp trunk/helgrind/tests/bar_bad.stderr.exp trunk/helgrind/tests/free_is_write.stderr.exp trunk/helgrind/tests/hg02_deadlock.stderr.exp trunk/helgrind/tests/hg03_inherit.stderr.exp trunk/helgrind/tests/hg04_race.stderr.exp trunk/helgrind/tests/hg05_race2.stderr.exp trunk/helgrind/tests/pth_barrier1.stderr.exp trunk/helgrind/tests/pth_barrier2.stderr.exp trunk/helgrind/tests/rwlock_race.stderr.exp trunk/helgrind/tests/tc01_simple_race.stderr.exp trunk/helgrind/tests/tc04_free_lock.stderr.exp trunk/helgrind/tests/tc05_simple_race.stderr.exp trunk/helgrind/tests/tc06_two_races.stderr.exp trunk/helgrind/tests/tc10_rec_lock.stderr.exp trunk/helgrind/tests/tc12_rwl_trivial.stderr.exp trunk/helgrind/tests/tc13_laog1.stderr.exp trunk/helgrind/tests/tc14_laog_dinphils.stderr.exp trunk/helgrind/tests/tc15_laog_lockdel.stderr.exp trunk/helgrind/tests/tc16_byterace.stderr.exp trunk/helgrind/tests/tc19_shadowmem.stderr.exp trunk/helgrind/tests/tc21_pthonce.stderr.exp trunk/helgrind/tests/tc22_exit_w_lock.stderr.exp trunk/helgrind/tests/tc23_bogus_condwait.stderr.exp [... diff too large to include ...] |
|
From: <sv...@va...> - 2011-06-24 10:14:32
|
Author: sewardj Date: 2011-06-24 11:09:41 +0100 (Fri, 24 Jun 2011) New Revision: 11824 Log: Merge the contents of the HGDEV2 branch into trunk: * performance and scalability improvements * show locks held by both threads in a race * show all 4 locks involved in a lock order violation * better delimited error messages Modified: trunk/coregrind/m_xarray.c trunk/helgrind/hg_basics.c trunk/helgrind/hg_basics.h trunk/helgrind/hg_errors.c trunk/helgrind/hg_errors.h trunk/helgrind/hg_lock_n_thread.h trunk/helgrind/hg_main.c trunk/helgrind/libhb.h trunk/helgrind/libhb_core.c trunk/include/pub_tool_xarray.h [... diff too large to include ...] |