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
(32) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(8) |
2
(8) |
3
(15) |
4
(14) |
5
(12) |
6
(40) |
7
(9) |
|
8
(5) |
9
(12) |
10
(9) |
11
(13) |
12
(7) |
13
(7) |
14
(19) |
|
15
(18) |
16
(13) |
17
(16) |
18
(8) |
19
(16) |
20
(16) |
21
(12) |
|
22
(21) |
23
(39) |
24
(27) |
25
(33) |
26
(41) |
27
(17) |
28
(15) |
|
From: <sv...@va...> - 2009-02-23 07:17:12
|
Author: njn
Date: 2009-02-23 07:17:08 +0000 (Mon, 23 Feb 2009)
New Revision: 9238
Log:
Fix some more 'make check' warnings, ones that appear on non-Linux
platforms.
Modified:
trunk/massif/tests/malloc_usable.c
trunk/memcheck/tests/malloc_usable.c
trunk/memcheck/tests/memalign2.c
trunk/none/tests/rlimit_nofile.c
trunk/none/tests/susphello.c
trunk/perf/tinycc.c
Modified: trunk/massif/tests/malloc_usable.c
===================================================================
--- trunk/massif/tests/malloc_usable.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/massif/tests/malloc_usable.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -5,12 +5,12 @@
int main(void)
{
+# if !defined(_AIX)
// Because our allocations are in multiples of 8 or 16, 99 will round up
// to 104 or 112.
int* x = malloc(99);
// XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-# if !defined(_AIX)
assert(104 == malloc_usable_size(x) ||
112 == malloc_usable_size(x));
assert( 0 == malloc_usable_size(NULL));
Modified: trunk/memcheck/tests/malloc_usable.c
===================================================================
--- trunk/memcheck/tests/malloc_usable.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/memcheck/tests/malloc_usable.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -5,12 +5,12 @@
int main(void)
{
+# if !defined(_AIX)
// Because Memcheck marks any slop as inaccessible, it doesn't round up
// sizes for malloc_usable_size().
int* x = malloc(99);
- // DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-# if !defined(_AIX)
+ // XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
assert(99 == malloc_usable_size(x));
assert( 0 == malloc_usable_size(NULL));
assert( 0 == malloc_usable_size((void*)0xdeadbeef));
Modified: trunk/memcheck/tests/memalign2.c
===================================================================
--- trunk/memcheck/tests/memalign2.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/memcheck/tests/memalign2.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -19,6 +19,10 @@
int main ( void )
{
+# if defined(_AIX)
+ printf("AIX 5.2 knows about neither memalign() nor posix_memalign().\n");
+
+# else
// Nb: assuming VG_MIN_MALLOC_SZB is 8!
// Should work with both 32-bit and 64-bit pointers, though.
@@ -26,10 +30,6 @@
int res;
assert(sizeof(long int) == sizeof(void*));
-# if defined(_AIX)
- printf("AIX 5.2 knows about neither memalign() nor posix_memalign().\n");
-
-# else
p = memalign(0, 100); assert(0 == (long)p % 8);
p = memalign(1, 100); assert(0 == (long)p % 8);
p = memalign(2, 100); assert(0 == (long)p % 8);
Modified: trunk/none/tests/rlimit_nofile.c
===================================================================
--- trunk/none/tests/rlimit_nofile.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/none/tests/rlimit_nofile.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -37,8 +37,9 @@
if (newrlim.rlim_cur != oldrlim.rlim_cur / 2)
{
- fprintf(stderr, "rlim_cur is %lu (should be %lu)\n",
- newrlim.rlim_cur, oldrlim.rlim_cur / 2);
+ fprintf(stderr, "rlim_cur is %llu (should be %llu)\n",
+ (unsigned long long)newrlim.rlim_cur,
+ (unsigned long long)oldrlim.rlim_cur / 2);
}
if (newrlim.rlim_max != oldrlim.rlim_max)
Modified: trunk/none/tests/susphello.c
===================================================================
--- trunk/none/tests/susphello.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/none/tests/susphello.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -20,7 +20,7 @@
#include <unistd.h>
#include <dlfcn.h>
-
+#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <string.h>
Modified: trunk/perf/tinycc.c
===================================================================
--- trunk/perf/tinycc.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/perf/tinycc.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -20606,7 +20606,7 @@
void rt_error(ucontext_t *uc, const char *fmt, ...)
{
va_list ap;
- unsigned long pc;
+ unsigned long pc = 0; // shut gcc up
int i;
va_start(ap, fmt);
|
|
From: Bart V. A. <bar...@gm...> - 2009-02-23 07:14:33
|
On Mon, Feb 23, 2009 at 5:43 AM, Nicholas Nethercote <n.n...@gm...> wrote: > Pretty much every file in Valgrind gets $(WERROR) as part of the > compile flags. But I can't work out what it's for -- that string > isn't present in the info pages for automake, autoconf or make, nor is > it defined in configure.in or any of our generated Makefiles. AFAICT > it's always empty (at least, on Linux and Darwin where I've checked). > > So I'd like to get rid of it, unless someone can identify what it's for. My guess is that this flag can be used as follows (I don't use this flag): make WERROR=-Werror Bart. |
|
From: Bart V. A. <bar...@gm...> - 2009-02-23 07:13:06
|
On Mon, Feb 23, 2009 at 7:30 AM, Nicholas Nethercote <n.n...@gm...> wrote: > I'd like to turn this warning on. Possibly via -Wextra, which brings > some other warnings into the mix, but if so then -Wno-sign-compare and > -Wno-unused-parameter would also be needed to avoid lots of IMHO > unimportant warnings. Thoughts? Regarding -Wextra: older gcc versions only understood -W, newer understand both -W and -Wextra. That is why I added a test to configure.in for this flag (FLAG_W_EXTRA). Please keep in mind that the exact meaning of -Wextra changes with each gcc version. An alternative is to specify each desired warning option explicitly. But this also implies that support for warning flags must be tested before each flag is used, or that more configure tests for compiler flags will have to be added. Bart. |
|
From: <sv...@va...> - 2009-02-23 06:45:04
|
Author: njn
Date: 2009-02-23 06:44:51 +0000 (Mon, 23 Feb 2009)
New Revision: 9237
Log:
Get rid of all "make check" compile warnings, except for the ones from
fxtract.c.
Also, gets rid of some of the warnings that -Wextra finds in Massif.
Modified:
trunk/drd/tests/pth_barrier_race.c
trunk/exp-ptrcheck/tests/Makefile.am
trunk/exp-ptrcheck/tests/stackerr.c
trunk/exp-ptrcheck/tests/tricky.c
trunk/massif/ms_main.c
trunk/memcheck/tests/Makefile.am
trunk/none/tests/coolo_sigaction.cpp
trunk/none/tests/fdleak_cmsg.c
trunk/perf/Makefile.am
trunk/perf/tinycc.c
Modified: trunk/drd/tests/pth_barrier_race.c
===================================================================
--- trunk/drd/tests/pth_barrier_race.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/drd/tests/pth_barrier_race.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -12,8 +12,8 @@
#include <pthread.h>
#include <stdlib.h>
+#include <unistd.h>
-
static pthread_barrier_t* barrier;
Modified: trunk/exp-ptrcheck/tests/Makefile.am
===================================================================
--- trunk/exp-ptrcheck/tests/Makefile.am 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/exp-ptrcheck/tests/Makefile.am 2009-02-23 06:44:51 UTC (rev 9237)
@@ -80,7 +80,7 @@
# To make it a bit more realistic, build hackedbz2.c with at
# least some optimisation.
-hackedbz2_CFLAGS = $(AM_CFLAGS) -O
+hackedbz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline
# C ones
pth_create_LDADD = -lpthread
Modified: trunk/exp-ptrcheck/tests/stackerr.c
===================================================================
--- trunk/exp-ptrcheck/tests/stackerr.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/exp-ptrcheck/tests/stackerr.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -43,10 +43,11 @@
for (i = 0; i < 7+1; i++) {
a[i] = 0;
}
- char beforebuf[8];
+ {char beforebuf[8];
char buf[8];
char afterbuf[8];
sprintf(buf, "%d", 123456789);
return 1 & ((a[4] + beforea[1] + aftera[1] + beforebuf[1]
+ buf[2] + afterbuf[3]) / 100000) ;
+ }
}
Modified: trunk/exp-ptrcheck/tests/tricky.c
===================================================================
--- trunk/exp-ptrcheck/tests/tricky.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/exp-ptrcheck/tests/tricky.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -8,10 +8,12 @@
// to zero.
int u[20];
int* p = malloc(sizeof(int) * 100);
-
+ int* n;
+ int* x;
+
p[0] = 0; // ok
- int* n = (int*)((long)p + (long)u); // result is n, because near zero!
- int* x = (int*)((long)n - (long)u); // x == p
+ n = (int*)((long)p + (long)u); // result is n, because near zero!
+ x = (int*)((long)n - (long)u); // x == p
x[0] = 0; // ok, originally caused false pos.
return 0;
Modified: trunk/massif/ms_main.c
===================================================================
--- trunk/massif/ms_main.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/massif/ms_main.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -220,8 +220,6 @@
VG_(message)(Vg_DebugMsg, "Massif: " format, ##args); \
}
-
-
//------------------------------------------------------------//
//--- Statistics ---//
//------------------------------------------------------------//
@@ -358,7 +356,7 @@
// a UInt, but this caused problems on 64-bit machines when it was
// multiplied by a small negative number and then promoted to a
// word-sized type -- it ended up with a value of 4.2 billion. Sigh.
-static SizeT clo_heap_admin = 8;
+static SSizeT clo_heap_admin = 8;
static Bool clo_stacks = False;
static UInt clo_depth = 30;
static double clo_threshold = 1.0; // percentage
@@ -1262,7 +1260,7 @@
// snapshot, or what kind of snapshot, are made elsewhere.
static void
take_snapshot(Snapshot* snapshot, SnapshotKind kind, Time time,
- Bool is_detailed, Char* what)
+ Bool is_detailed)
{
tl_assert(!is_snapshot_in_use(snapshot));
tl_assert(have_started_executing_code);
@@ -1348,7 +1346,7 @@
// Take the snapshot.
snapshot = & snapshots[next_snapshot_i];
- take_snapshot(snapshot, kind, time, is_detailed, what);
+ take_snapshot(snapshot, kind, time, is_detailed);
// Record if it was detailed.
if (is_detailed) {
@@ -1465,7 +1463,7 @@
Bool is_custom_alloc = (NULL != p);
SizeT actual_szB, slop_szB;
- if (req_szB < 0) return NULL;
+ if ((SSizeT)req_szB < 0) return NULL;
// Allocate and zero if necessary
if (!p) {
@@ -1667,7 +1665,7 @@
return new_block( tid, NULL, szB, alignB, False );
}
-static void ms_free ( ThreadId tid, void* p )
+static void ms_free ( ThreadId tid __attribute__((unused)), void* p )
{
die_block( p, /*custom_free*/False );
}
@@ -1687,7 +1685,7 @@
return renew_block(tid, p_old, new_szB);
}
-static SizeT ms_malloc_usable_size ( ThreadId tid, void* p )
+static SizeT ms_malloc_usable_size ( ThreadId tid, void* p )
{
HP_Chunk* hc = VG_(HT_lookup)( malloc_list, (UWord)p );
@@ -1709,7 +1707,7 @@
update_alloc_stats(stack_szB_delta);
}
-static INLINE void new_mem_stack_2(Addr a, SizeT len, Char* what)
+static INLINE void new_mem_stack_2(SizeT len, Char* what)
{
if (have_started_executing_code) {
VERB(3, "<<< new_mem_stack (%ld)", len);
@@ -1720,7 +1718,7 @@
}
}
-static INLINE void die_mem_stack_2(Addr a, SizeT len, Char* what)
+static INLINE void die_mem_stack_2(SizeT len, Char* what)
{
if (have_started_executing_code) {
VERB(3, "<<< die_mem_stack (%ld)", -len);
@@ -1734,22 +1732,22 @@
static void new_mem_stack(Addr a, SizeT len)
{
- new_mem_stack_2(a, len, "stk-new");
+ new_mem_stack_2(len, "stk-new");
}
static void die_mem_stack(Addr a, SizeT len)
{
- die_mem_stack_2(a, len, "stk-die");
+ die_mem_stack_2(len, "stk-die");
}
static void new_mem_stack_signal(Addr a, SizeT len, ThreadId tid)
{
- new_mem_stack_2(a, len, "sig-new");
+ new_mem_stack_2(len, "sig-new");
}
static void die_mem_stack_signal(Addr a, SizeT len)
{
- die_mem_stack_2(a, len, "sig-die");
+ die_mem_stack_2(len, "sig-die");
}
Modified: trunk/memcheck/tests/Makefile.am
===================================================================
--- trunk/memcheck/tests/Makefile.am 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/memcheck/tests/Makefile.am 2009-02-23 06:44:51 UTC (rev 9237)
@@ -226,23 +226,44 @@
wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
writev zeropage
+
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
-# Extra stuff for C tests
+deep_templates_SOURCES = deep_templates.cpp
+deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
+
+long_namespace_xml_SOURCES = long_namespace_xml.cpp
+
memcmptest_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcmp
-vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2
-vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2
-vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2
-vcpu_fnfns_LDADD = -lm
-wrap6_CFLAGS = $(AM_CFLAGS) -O2
+mismatches_SOURCES = mismatches.cpp
+
+new_nothrow_SOURCES = new_nothrow.cpp
+new_override_SOURCES = new_override.cpp
+
+# This requires optimisation in order to get just one resulting error.
+origin4_many_CFLAGS = $(AM_CFLAGS) -O
+
+# Apply -O so as to run in reasonable time.
+origin5_bz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline
+origin6_fp_CFLAGS = $(AM_CFLAGS) -O
+
# Don't allow GCC to inline memcpy(), because then we can't intercept it
overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy
+
str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow
+
supp_unknown_SOURCES = badjump.c
supp1_SOURCES = supp.c
supp2_SOURCES = supp.c
+
+vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fnfns_LDADD = -lm
+wrap6_CFLAGS = $(AM_CFLAGS) -O2
+
# To make it a bit more realistic, have some optimisation enabled
# for the varinfo tests. We still expect sane results.
varinfo1_CFLAGS = $(AM_CFLAGS) -O
@@ -251,20 +272,7 @@
varinfo4_CFLAGS = $(AM_CFLAGS) -O
varinfo5_CFLAGS = $(AM_CFLAGS) -O
varinfo6_CFLAGS = $(AM_CFLAGS) -O
-# This requires optimisation in order to get just one resulting error.
-origin4_many_CFLAGS = $(AM_CFLAGS) -O
-# Apply -O so as to run in reasonable time.
-origin5_bz2_CFLAGS = $(AM_CFLAGS) -O
-origin6_fp_CFLAGS = $(AM_CFLAGS) -O
-# C++ tests
-mismatches_SOURCES = mismatches.cpp
-new_nothrow_SOURCES = new_nothrow.cpp
-new_override_SOURCES = new_override.cpp
-deep_templates_SOURCES = deep_templates.cpp
-long_namespace_xml_SOURCES = long_namespace_xml.cpp
-deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
-
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
else
@@ -282,6 +290,36 @@
endif
endif
+# Build shared object for varinfo5
+varinfo5_SOURCES = varinfo5.c
+varinfo5_DEPENDENCIES = varinfo5so.so
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
+ varinfo5_LDADD = `pwd`/varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
+else
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
+ varinfo5_LDADD = `pwd`/varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+else
+ varinfo5_LDADD = varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) \
+ -Wl,-rpath,$(top_builddir)/memcheck/tests
+endif
+endif
+
+varinfo5so_so_SOURCES = varinfo5so.c
+varinfo5so_so_CFLAGS = $(AM_CFLAGS) -fpic -O -Wno-shadow
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
+else
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ -Wl,-G -Wl,-bnogc
+else
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ -Wl,-soname -Wl,varinfo5so.so
+endif
+endif
# Build shared object for wrap7
wrap7_SOURCES = wrap7.c
wrap7_DEPENDENCIES = wrap7so.so
@@ -300,8 +338,6 @@
endif
wrap7so_so_SOURCES = wrap7so.c
-wrap7so_so_LDADD =
-wrap7so_so_DEPENDENCIES =
wrap7so_so_CFLAGS = $(AM_CFLAGS) -fpic
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
@@ -315,36 +351,4 @@
endif
endif
-# Build shared object for varinfo5
-varinfo5_SOURCES = varinfo5.c
-varinfo5_DEPENDENCIES = varinfo5so.so
-if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
- varinfo5_LDADD = `pwd`/varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
-else
-if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
- varinfo5_LDADD = `pwd`/varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
-else
- varinfo5_LDADD = varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) \
- -Wl,-rpath,$(top_builddir)/memcheck/tests
-endif
-endif
-varinfo5so_so_SOURCES = varinfo5so.c
-varinfo5so_so_LDADD =
-varinfo5so_so_DEPENDENCIES =
-varinfo5so_so_CFLAGS = $(AM_CFLAGS) -fpic -O
-if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
-else
-if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
- -Wl,-G -Wl,-bnogc
-else
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
- -Wl,-soname -Wl,varinfo5so.so
-endif
-endif
-
Modified: trunk/none/tests/coolo_sigaction.cpp
===================================================================
--- trunk/none/tests/coolo_sigaction.cpp 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/none/tests/coolo_sigaction.cpp 2009-02-23 06:44:51 UTC (rev 9237)
@@ -42,11 +42,12 @@
{
int i;
char buffer[200];
+ size_t dummy_size_t;
setupHandlers();
FILE *p = popen("echo Hallo World", "r");
while (!feof(p)) {
int n = fread(buffer, 200, 1, p);
- write(2, buffer, n);
+ dummy_size_t = write(2, buffer, n);
}
fclose(p);
for (i = 0; i < 1000000; i++) ;
Modified: trunk/none/tests/fdleak_cmsg.c
===================================================================
--- trunk/none/tests/fdleak_cmsg.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/none/tests/fdleak_cmsg.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -59,7 +59,7 @@
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
- sprintf(addr.sun_path, sock);
+ sprintf(addr.sun_path, "%s", sock);
unlink(addr.sun_path);
if(bind(s, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
@@ -135,7 +135,7 @@
}
addr.sun_family = AF_UNIX;
- sprintf(addr.sun_path, sock);
+ sprintf(addr.sun_path, "%s", sock);
do {
count++;
Modified: trunk/perf/Makefile.am
===================================================================
--- trunk/perf/Makefile.am 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/perf/Makefile.am 2009-02-23 06:44:51 UTC (rev 9237)
@@ -23,7 +23,9 @@
AM_CXXFLAGS = $(AM_CFLAGS)
# Extra stuff
-fbench_CFLAGS = $(AM_FLAG_M3264_PRI) -g -O2
+bz2_CFLAGS = $(AM_CFLAGS) -Wno-inline
+
+fbench_CFLAGS = $(AM_CFLAGS) -O2
ffbench_LDADD = -lm
-tinycc_CFLAGS = $(AM_CFLAGS) -Wno-shadow
+tinycc_CFLAGS = $(AM_CFLAGS) -Wno-shadow -Wno-inline
Modified: trunk/perf/tinycc.c
===================================================================
--- trunk/perf/tinycc.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/perf/tinycc.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -59,6 +59,12 @@
//#endif /* !CONFIG_TCCBOOT */
+// Dummy variables used to avoid warnings like these:
+// warning: ignoring return value of ‘fwrite’, declared with attribute
+// warn_unused_result
+char* dummy_char_star;
+size_t dummy_size_t;
+
// njn: inlined elf.h
//#include "elf.h"
//---------------------------------------------------------------------------
@@ -14839,7 +14845,7 @@
section_sym = put_elf_sym(symtab_section, 0, 0,
ELF32_ST_INFO(STB_LOCAL, STT_SECTION), 0,
text_section->sh_num, NULL);
- getcwd(buf, sizeof(buf));
+ dummy_char_star = getcwd(buf, sizeof(buf));
pstrcat(buf, sizeof(buf), "/");
put_stabs_r(buf, N_SO, 0, 0,
text_section->data_offset, text_section, section_sym);
@@ -19193,7 +19199,7 @@
offset++;
}
size = s->sh_size;
- fwrite(s->data, 1, size, f);
+ dummy_size_t = fwrite(s->data, 1, size, f);
offset += size;
}
}
@@ -19776,8 +19782,8 @@
ehdr.e_shnum = shnum;
ehdr.e_shstrndx = shnum - 1;
- fwrite(&ehdr, 1, sizeof(Elf32_Ehdr), f);
- fwrite(phdr, 1, phnum * sizeof(Elf32_Phdr), f);
+ dummy_size_t = fwrite(&ehdr, 1, sizeof(Elf32_Ehdr), f);
+ dummy_size_t = fwrite(phdr, 1, phnum * sizeof(Elf32_Phdr), f);
offset = sizeof(Elf32_Ehdr) + phnum * sizeof(Elf32_Phdr);
for(i=1;i<s1->nb_sections;i++) {
@@ -19788,7 +19794,7 @@
offset++;
}
size = s->sh_size;
- fwrite(s->data, 1, size, f);
+ dummy_size_t = fwrite(s->data, 1, size, f);
offset += size;
}
}
@@ -19816,7 +19822,7 @@
sh->sh_offset = s->sh_offset;
sh->sh_size = s->sh_size;
}
- fwrite(sh, 1, sizeof(Elf32_Shdr), f);
+ dummy_size_t = fwrite(sh, 1, sizeof(Elf32_Shdr), f);
}
} else {
tcc_output_binary(s1, f, section_order);
@@ -19838,7 +19844,7 @@
data = tcc_malloc(size);
lseek(fd, file_offset, SEEK_SET);
- read(fd, data, size);
+ dummy_size_t = read(fd, data, size);
return data;
}
@@ -19975,7 +19981,7 @@
unsigned char *ptr;
lseek(fd, file_offset + sh->sh_offset, SEEK_SET);
ptr = section_ptr_add(s, size);
- read(fd, ptr, size);
+ dummy_size_t = read(fd, ptr, size);
} else {
s->data_offset += size;
}
@@ -20157,7 +20163,7 @@
unsigned long file_offset;
/* skip magic which was already checked */
- read(fd, magic, sizeof(magic));
+ dummy_size_t = read(fd, magic, sizeof(magic));
for(;;) {
len = read(fd, &hdr, sizeof(hdr));
@@ -20212,7 +20218,7 @@
const char *name, *soname, *p;
DLLReference *dllref;
- read(fd, &ehdr, sizeof(ehdr));
+ dummy_size_t = read(fd, &ehdr, sizeof(ehdr));
/* test CPU specific stuff */
if (ehdr.e_ident[5] != ELFDATA2LSB ||
|
|
From: Nicholas N. <n.n...@gm...> - 2009-02-23 06:31:04
|
Hi,
This code is from coregrind/m_libcbase.c:
void* VG_(memmove)(void *dest, const void *src, SizeT sz)
{
SizeT i;
if (sz == 0)
return dest;
if (dest < src) {
for (i = 0; i < sz; i++) {
((UChar*)dest)[i] = ((UChar*)src)[i];
}
}
else if (dest > src) {
for (i = sz - 1; i >= 0; i--) {
((UChar*)dest)[i] = ((UChar*)src)[i];
}
}
return dest;
}
It has a 50% chance of crashing or looping infinitely. Why? The
condition of the for-loop in the else-branch never fails, because i is
unsigned. Fortunately this function is not actually used anywhere.
The warning -Wtype-limits finds this problem, and 185 other ones like
it (ie. comparisons that are always true or false) in the core and
tools, and some more in the tests. I've looked at a few of these,
some of them are just redundant assertions that an unsigned value is
greater than zero, but even those are worrying.
I'd like to turn this warning on. Possibly via -Wextra, which brings
some other warnings into the mix, but if so then -Wno-sign-compare and
-Wno-unused-parameter would also be needed to avoid lots of IMHO
unimportant warnings. Thoughts?
Nick
|
|
From: Nicholas N. <n.n...@gm...> - 2009-02-23 04:43:44
|
Hi, Pretty much every file in Valgrind gets $(WERROR) as part of the compile flags. But I can't work out what it's for -- that string isn't present in the info pages for automake, autoconf or make, nor is it defined in configure.in or any of our generated Makefiles. AFAICT it's always empty (at least, on Linux and Darwin where I've checked). So I'd like to get rid of it, unless someone can identify what it's for. Nick |
|
From: <sv...@va...> - 2009-02-23 04:29:42
|
Author: njn
Date: 2009-02-23 04:29:37 +0000 (Mon, 23 Feb 2009)
New Revision: 9236
Log:
Comment out all the #warning lines to make compilation less noisy. They're
still easy to find, as they all have both "DDD" and "#warning" in the
comment.
Modified:
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/DARWIN/coregrind/m_coredump/coredump-amd64-darwin.c
branches/DARWIN/coregrind/m_coredump/coredump-x86-darwin.c
branches/DARWIN/coregrind/m_libcproc.c
branches/DARWIN/coregrind/m_main.c
branches/DARWIN/coregrind/m_redir.c
branches/DARWIN/coregrind/m_scheduler/scheduler.c
branches/DARWIN/coregrind/m_sigframe/sigframe-amd64-darwin.c
branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c
branches/DARWIN/coregrind/m_signals.c
branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c
branches/DARWIN/coregrind/m_translate.c
Modified: branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -2206,7 +2206,7 @@
/* We have been advised that the mapping is allowable at the
specified address. So hand it off to the kernel, and propagate
any resulting failure immediately. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
start, length, prot,
VKI_MAP_FIXED|VKI_MAP_PRIVATE,
@@ -2275,7 +2275,7 @@
/* We have been advised that the mapping is allowable at the
specified address. So hand it off to the kernel, and propagate
any resulting failure immediately. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
start, length, prot,
VKI_MAP_FIXED|VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS,
@@ -2333,7 +2333,7 @@
/* We have been advised that the mapping is allowable at the
advised address. So hand it off to the kernel, and propagate
any resulting failure immediately. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
advised, length, prot,
VKI_MAP_FIXED|VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS,
@@ -2793,7 +2793,7 @@
return False;
/* Extend the kernel's mapping. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
nsegments[segR].start, delta,
prot,
@@ -2829,7 +2829,7 @@
return False;
/* Extend the kernel's mapping. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
nsegments[segA].start-delta, delta,
prot,
Modified: branches/DARWIN/coregrind/m_coredump/coredump-amd64-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_coredump/coredump-amd64-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_coredump/coredump-amd64-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -35,5 +35,5 @@
void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size)
{
-#warning GrP fixme coredump
+ // DDD: #warning GrP fixme coredump
}
Modified: branches/DARWIN/coregrind/m_coredump/coredump-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_coredump/coredump-x86-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_coredump/coredump-x86-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -35,5 +35,5 @@
void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size)
{
-#warning GrP fixme coredump
+ // DDD: #warning GrP fixme coredump
}
Modified: branches/DARWIN/coregrind/m_libcproc.c
===================================================================
--- branches/DARWIN/coregrind/m_libcproc.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_libcproc.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -706,7 +706,7 @@
#if defined(__NR_nanosleep)
(void)VG_(do_syscall2)(__NR_nanosleep, (UWord)ts, (UWord)NULL);
#elif defined(VGO_darwin)
-# warning GrP fixme use semwait_signal for nanosleep
+ // DDD: #warning GrP fixme use semwait_signal for nanosleep
#else
# error no nanosleep implementation
#endif
Modified: branches/DARWIN/coregrind/m_main.c
===================================================================
--- branches/DARWIN/coregrind/m_main.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_main.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -2043,7 +2043,7 @@
// Nb: temporarily parks the saved blocking-mask in saved_sigmask.
VG_(debugLog)(1, "main", "Initialise signal management\n");
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(sigstartup_actions)();
#endif
@@ -2279,7 +2279,7 @@
/* We were killed by a fatal signal, so replicate the effect */
vg_assert(VG_(threads)[tid].os_state.fatalsig != 0);
#if defined(VGO_darwin)
-#warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(kill_self)(VG_(threads)[tid].os_state.fatalsig);
#endif
Modified: branches/DARWIN/coregrind/m_redir.c
===================================================================
--- branches/DARWIN/coregrind/m_redir.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_redir.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -963,20 +963,20 @@
/* If we're using memcheck, use these intercepts right from
the start, otherwise dyld makes a lot of noise. */
if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
- add_hardwired_spec("dyld", "strcmp",
- (Addr)&VG_(darwin_REDIR_FOR_strcmp), NULL);
- add_hardwired_spec("dyld", "strlen",
- (Addr)&VG_(darwin_REDIR_FOR_strlen), NULL);
- add_hardwired_spec("dyld", "strcat",
- (Addr)&VG_(darwin_REDIR_FOR_strcat), NULL);
- add_hardwired_spec("dyld", "strcpy",
- (Addr)&VG_(darwin_REDIR_FOR_strcpy), NULL);
- add_hardwired_spec("dyld", "strlcat",
- (Addr)&VG_(darwin_REDIR_FOR_strlcat), NULL);
+ add_hardwired_spec("dyld", "strcmp",
+ (Addr)&VG_(darwin_REDIR_FOR_strcmp), NULL);
+ add_hardwired_spec("dyld", "strlen",
+ (Addr)&VG_(darwin_REDIR_FOR_strlen), NULL);
+ add_hardwired_spec("dyld", "strcat",
+ (Addr)&VG_(darwin_REDIR_FOR_strcat), NULL);
+ add_hardwired_spec("dyld", "strcpy",
+ (Addr)&VG_(darwin_REDIR_FOR_strcpy), NULL);
+ add_hardwired_spec("dyld", "strlcat",
+ (Addr)&VG_(darwin_REDIR_FOR_strlcat), NULL);
#if defined(VGP_amd64_darwin)
-#warning fixme rdar://6166275
- add_hardwired_spec("dyld", "arc4random",
- (Addr)&VG_(darwin_REDIR_FOR_arc4random), NULL);
+ // DDD: #warning fixme rdar://6166275
+ add_hardwired_spec("dyld", "arc4random",
+ (Addr)&VG_(darwin_REDIR_FOR_arc4random), NULL);
#endif
}
Modified: branches/DARWIN/coregrind/m_scheduler/scheduler.c
===================================================================
--- branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -430,7 +430,7 @@
VG_(threads)[tid].altstack.ss_flags = VKI_SS_DISABLE;
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
{
vki_sigset_t savedmask;
@@ -879,7 +879,7 @@
if (jumped) {
block_signals(tid);
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(poll_signals)(tid);
#endif
@@ -1000,7 +1000,7 @@
/* Look for any pending signals for this thread, and set them up
for delivery */
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(poll_signals)(tid);
#endif
@@ -1102,7 +1102,7 @@
segment override use) */
/* jrs 2005 03 11: is this correct? */
#if defined(VGO_darwin)
-# warning GrP fixme synth signals
+ // DDD: #warning GrP fixme synth signals
VG_(core_panic)("mapfail - no synth signals on darwin");
#else
VG_(synth_fault)(tid);
@@ -1167,7 +1167,7 @@
case VEX_TRC_JMP_SIGSEGV:
#if defined(VGO_darwin)
-# warning GrP fixme synth signals
+ // DDD: #warning GrP fixme synth signals
VG_(core_panic)("sigsegv - no synth signals on darwin");
#else
VG_(synth_fault)(tid);
Modified: branches/DARWIN/coregrind/m_sigframe/sigframe-amd64-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_sigframe/sigframe-amd64-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_sigframe/sigframe-amd64-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -1 +1 @@
-#warning fixme
+// DDD: #warning fixme
Modified: branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -1 +1 @@
-#warning fixme
+// DDD: #warning fixme
Modified: branches/DARWIN/coregrind/m_signals.c
===================================================================
--- branches/DARWIN/coregrind/m_signals.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_signals.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -112,7 +112,7 @@
#if defined(VGO_darwin)
-#warning GrP fixme signals
+// DDD: #warning GrP fixme signals
#else
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -92,9 +92,9 @@
static void x86_float_state64_from_vex(x86_float_state64_t *mach,
VexGuestAMD64State *vex)
{
-#warning GrP fixme fp state
+ // DDD: #warning GrP fixme fp state
- VG_(memcpy)(&mach->__fpu_xmm0, &vex->guest_XMM0, 16 * sizeof(mach->__fpu_xmm0));
+ VG_(memcpy)(&mach->__fpu_xmm0, &vex->guest_XMM0, 16 * sizeof(mach->__fpu_xmm0));
}
@@ -134,7 +134,7 @@
vex->guest_RSI = mach->__rsi;
vex->guest_RBP = mach->__rbp;
vex->guest_RSP = mach->__rsp;
-#warning GrP fixme eflags
+ // DDD: #warning GrP fixme eflags
vex->guest_RIP = mach->__rip;
vex->guest_R8 = mach->__r8;
vex->guest_R9 = mach->__r9;
@@ -154,7 +154,7 @@
static void x86_float_state64_to_vex(const x86_float_state64_t *mach,
VexGuestAMD64State *vex)
{
-#warning GrP fixme fp state
+ // DDD: #warning GrP fixme fp state
VG_(memcpy)(&vex->guest_XMM0, &mach->__fpu_xmm0, 16 * sizeof(mach->__fpu_xmm0));
}
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -775,7 +775,7 @@
//tst->sys_flags &= ~SfMayBlock;
break;
-#warning GrP fixme darwin-specific ioctl
+ // DDD: #warning GrP fixme darwin-specific ioctl
case VKI_FIODTYPE:
PRE_MEM_WRITE( "ioctl(FIONREAD)", ARG3, sizeof(int) );
break;
@@ -902,7 +902,7 @@
case VKI_SIOCSPGRP:
break;
-#warning GrP fixme darwin-specific ioctl
+ // DDD: #warning GrP fixme darwin-specific ioctl
case VKI_FIODTYPE:
POST_MEM_WRITE( ARG3, sizeof(int) );
break;
@@ -2116,8 +2116,8 @@
ML_(buf_and_len_pre_check) ( tid, optval_p, optlen_p,
"socketcall.getsockopt(optval)",
"socketcall.getsockopt(optlen)" );
-# warning GrP fixme darwin-specific sockopts
}
+ // DDD: #warning GrP fixme darwin-specific sockopts
}
POST(sys_getsockopt)
@@ -2129,7 +2129,7 @@
ML_(buf_and_len_post_check) ( tid, VG_(mk_SysRes_Success)(RES),
optval_p, optlen_p,
"socketcall.getsockopt(optlen_out)" );
-# warning GrP fixme darwin-specific sockopts
+ // DDD: #warning GrP fixme darwin-specific sockopts
}
}
@@ -2783,7 +2783,7 @@
oldset = (vki_sigset_t*)ARG3;
#if defined(VGO_darwin)
-#warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
SET_STATUS_from_SysRes(
VG_(do_sys_sigprocmask) ( tid, ARG1 /*how*/, set, oldset)
@@ -2817,7 +2817,7 @@
PRE_MEM_WRITE( "sigaltstack(oss)", ARG2, sizeof(vki_stack_t) );
}
-# warning GrP fixme signals
+ // DDD: # warning GrP fixme signals
// GrP fixme leopard 9A241 setjmp dies if sigaltstack fails (ecx)
SET_STATUS_Success(0);
}
@@ -4876,7 +4876,7 @@
MACH_ARG(mach_vm_protect.size));
UInt prot = MACH_ARG(mach_vm_protect.new_protection);
if (MACH_ARG(mach_vm_protect.set_maximum)) {
-#warning GrP fixme mprotect max
+ // DDD: #warning GrP fixme mprotect max
//VG_(mprotect_max_range)(start, end-start, prot);
} else {
ML_(notify_aspacem_and_tool_of_mprotect)(start, end-start, prot);
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -774,7 +774,7 @@
void VG_(init_preopened_fds)(void)
{
#if defined(VGO_darwin)
-# warning GrP fixme preopened fds
+ // DDD: #warning GrP fixme preopened fds
#else
Int ret;
struct vki_dirent d;
@@ -2454,7 +2454,7 @@
/* Let other thread(s) run */
VG_(vg_yield)();
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(poll_signals)(self);
#endif
@@ -2629,7 +2629,7 @@
VG_(setrlimit)(VKI_RLIMIT_DATA, &VG_(client_rlimit_data));
#if defined(VGO_darwin)
-# warning GrP fixme exec signals busted
+ // DDD: #warning GrP fixme exec signals busted
#else
/*
Set the signal state up for exec.
@@ -4056,7 +4056,7 @@
}
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
SET_STATUS_from_SysRes(
VG_(do_sys_sigaltstack) (tid, (vki_stack_t*)ARG1,
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -1704,7 +1704,7 @@
might have been created, and will have set SfPollAfter to
request a poll for them once the syscall is done. */
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: # warning GrP fixme signals
#else
if (sci->flags & SfPollAfter)
VG_(poll_signals)(tid);
@@ -1849,7 +1849,7 @@
int $0x80 == CD 80
int $0x80 == CD 81
*/
-#warning GrP fixme sysenter, int $0x81, int $0x82
+ // DDD: #warning GrP fixme sysenter, int $0x81, int $0x82
{
UChar *p = (UChar *)arch->vex.guest_EIP;
@@ -1862,7 +1862,7 @@
}
#elif defined(VGP_amd64_darwin)
-#warning GrP fixme amd64 restart unimplemented
+ // DDD: #warning GrP fixme amd64 restart unimplemented
vg_assert(0);
#else
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -85,9 +85,9 @@
static void x86_float_state32_from_vex(i386_float_state_t *mach,
VexGuestX86State *vex)
{
-#warning GrP fixme fp state
+ // DDD: #warning GrP fixme fp state
- VG_(memcpy)(&mach->__fpu_xmm0, &vex->guest_XMM0, 8 * sizeof(mach->__fpu_xmm0));
+ VG_(memcpy)(&mach->__fpu_xmm0, &vex->guest_XMM0, 8 * sizeof(mach->__fpu_xmm0));
}
@@ -128,7 +128,7 @@
vex->guest_EBP = mach->__ebp;
vex->guest_ESP = mach->__esp;
vex->guest_SS = mach->__ss;
-#warning GrP fixme eflags
+ // DDD: #warning GrP fixme eflags
vex->guest_EIP = mach->__eip;
vex->guest_CS = mach->__cs;
vex->guest_DS = mach->__ds;
@@ -140,7 +140,7 @@
static void x86_float_state32_to_vex(const i386_float_state_t *mach,
VexGuestX86State *vex)
{
-#warning GrP fixme fp state
+ // DDD: #warning GrP fixme fp state
VG_(memcpy)(&vex->guest_XMM0, &mach->__fpu_xmm0, 8 * sizeof(mach->__fpu_xmm0));
}
Modified: branches/DARWIN/coregrind/m_translate.c
===================================================================
--- branches/DARWIN/coregrind/m_translate.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_translate.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -1361,7 +1361,7 @@
/* U R busted, sonny. Place your hands on your head and step
away from the orig_addr. */
#if defined(VGO_darwin)
-#warning GrP fixme synth signals
+ // DDD: #warning GrP fixme synth signals
{
VG_(message)(Vg_UserMsg, "ERROR\n");
VG_(message)(Vg_UserMsg, "Thread %d jumped to bad address %#llx",
|
|
From: <sv...@va...> - 2009-02-23 04:17:04
|
Author: njn
Date: 2009-02-23 04:16:56 +0000 (Mon, 23 Feb 2009)
New Revision: 9235
Log:
Merged part of r9234 (unit_libcbase improvements) from the DARWIN branch.
Modified:
trunk/memcheck/tests/unit_libcbase.c
Modified: trunk/memcheck/tests/unit_libcbase.c
===================================================================
--- trunk/memcheck/tests/unit_libcbase.c 2009-02-23 04:14:34 UTC (rev 9234)
+++ trunk/memcheck/tests/unit_libcbase.c 2009-02-23 04:16:56 UTC (rev 9235)
@@ -6,38 +6,40 @@
#include "coregrind/m_libcbase.c"
+#define CHECK(x) \
+ if (!x) { fprintf(stderr, "failure: %s:%d\n", __FILE__, __LINE__); }
void test_isXYZ(void)
{
- assert( VG_(isspace)(' ') );
- assert( VG_(isspace)('\n') );
- assert( VG_(isspace)('\t') );
- assert( ! VG_(isspace)('3') );
- assert( ! VG_(isspace)('x') );
+ CHECK( VG_(isspace)(' ') );
+ CHECK( VG_(isspace)('\n') );
+ CHECK( VG_(isspace)('\t') );
+ CHECK( ! VG_(isspace)('3') );
+ CHECK( ! VG_(isspace)('x') );
- assert( VG_(isdigit)('0') );
- assert( VG_(isdigit)('1') );
- assert( VG_(isdigit)('5') );
- assert( VG_(isdigit)('9') );
- assert( ! VG_(isdigit)('a') );
- assert( ! VG_(isdigit)('!') );
+ CHECK( VG_(isdigit)('0') );
+ CHECK( VG_(isdigit)('1') );
+ CHECK( VG_(isdigit)('5') );
+ CHECK( VG_(isdigit)('9') );
+ CHECK( ! VG_(isdigit)('a') );
+ CHECK( ! VG_(isdigit)('!') );
}
void test_is_XYZ_digit()
{
Long x;
- assert( is_dec_digit('0', &x) && 0 == x );
- assert( is_dec_digit('1', &x) && 1 == x );
- assert( is_dec_digit('9', &x) && 9 == x );
+ CHECK( is_dec_digit('0', &x) && 0 == x );
+ CHECK( is_dec_digit('1', &x) && 1 == x );
+ CHECK( is_dec_digit('9', &x) && 9 == x );
- assert( is_hex_digit('0', &x) && 0 == x );
- assert( is_hex_digit('1', &x) && 1 == x );
- assert( is_hex_digit('9', &x) && 9 == x );
- assert( is_hex_digit('a', &x) && 10 == x );
- assert( is_hex_digit('f', &x) && 15 == x );
- assert( is_hex_digit('A', &x) && 10 == x );
- assert( is_hex_digit('F', &x) && 15 == x );
+ CHECK( is_hex_digit('0', &x) && 0 == x );
+ CHECK( is_hex_digit('1', &x) && 1 == x );
+ CHECK( is_hex_digit('9', &x) && 9 == x );
+ CHECK( is_hex_digit('a', &x) && 10 == x );
+ CHECK( is_hex_digit('f', &x) && 15 == x );
+ CHECK( is_hex_digit('A', &x) && 10 == x );
+ CHECK( is_hex_digit('F', &x) && 15 == x );
}
void test_strtoll(void)
@@ -90,8 +92,8 @@
long long res2 = strtoll (a[i].str, &endptr2, 10);
//printf("res1 = %lld, *endptr1 = '%c'\n", res1, *endptr1);
//printf("res2 = %lld, *endptr2 = '%c'\n", res2, *endptr2);
- assert(a[i].res == res1 && a[i].endptr_val == *endptr1);
- assert(res2 == res1 && *endptr2 == *endptr1);
+ CHECK(a[i].res == res1 && a[i].endptr_val == *endptr1);
+ CHECK(res2 == res1 && *endptr2 == *endptr1);
}
}
@@ -145,60 +147,13 @@
long long res2 = strtoll (a[i].str, &endptr2, 16);
//printf(" res1 = %lld, *endptr1 = '%c'\n", res1, *endptr1);
//printf(" res2 = %lld, *endptr2 = '%c'\n", res2, *endptr2);
- assert(a[i].res == res1 && a[i].endptr_val == *endptr1);
- assert(res2 == res1 && *endptr2 == *endptr1);
+ CHECK(a[i].res == res1 && a[i].endptr_val == *endptr1);
+ CHECK(res2 == res1 && *endptr2 == *endptr1);
}
}
- // VG_(strtod)()
- {
- StrtollInputs a[] = {
- // If there's no number at the head of the string, return 0, and
- // make 'endptr' point to the start of the string.
- { str : "", res : 0, endptr_val : '\0' },
- { str : " \n\t", res : 0, endptr_val : ' ' },
- { str : "one", res : 0, endptr_val : 'o' },
- { str : "\ntwo", res : 0, endptr_val : '\n' },
- // Successful conversion. Leading whitespace is ignored. A single
- // '-' or '+' is accepted. "0X" and "0x" are also allowed at the
- // front, but if no digits follow, just the "0" is converted.
- { str : "0", res : 0, endptr_val : '\0' },
- { str : "0", res : 0, endptr_val : '\0' },
- { str : "+0", res : 0, endptr_val : '\0' },
- { str : "-0", res : 0, endptr_val : '\0' },
- { str : "1", res : 1, endptr_val : '\0' },
- { str : "+1", res : 1, endptr_val : '\0' },
- { str : "-1", res : -1, endptr_val : '\0' },
- { str : "1a", res : 26, endptr_val : '\0' },
- { str : "-5F7", res : -1527, endptr_val : '\0' },
- { str : "0x1234567", res : 19088743, endptr_val : '\0' },
- { str : "007", res : 7, endptr_val : '\0' },
- { str : "0X00ABCD", res : 43981, endptr_val : '\0' },
- { str : " +AbC", res : 2748, endptr_val : '\0' },
- { str : " -0xAbC", res : -2748, endptr_val : '\0' },
- { str : " -0xxx", res : 0, endptr_val : 'x' },
- { str : "\n\t\r\v -56", res : -86, endptr_val : '\0' },
- { str : "123xyz", res : 291, endptr_val : 'x' },
- { str : " -123defghi", res : -1195503, endptr_val : 'g' },
-
- // Whitespace after the +/- is not allowed; conversion fails.
- { str : "+ 1", res : 0, endptr_val : '+' },
- { str : "-\n0x1", res : 0, endptr_val : '-' },
- };
-
- // Nb: We test the results against strtoll() as well.
- int i;
- for (i = 0; i < (sizeof(a) / sizeof(StrtollInputs)); i++) {
- Char* endptr1;
- char* endptr2;
- Long res1 = VG_(strtoll16)(a[i].str, &endptr1);
- long long res2 = strtoll (a[i].str, &endptr2, 16);
- //printf(" res1 = %lld, *endptr1 = '%c'\n", res1, *endptr1);
- //printf(" res2 = %lld, *endptr2 = '%c'\n", res2, *endptr2);
- assert(a[i].res == res1 && a[i].endptr_val == *endptr1);
- assert(res2 == res1 && *endptr2 == *endptr1);
- }
- }
+ // VG_(strtod)()
+ // XXX: todo
}
int main(void)
|
|
From: <sv...@va...> - 2009-02-23 04:14:41
|
Author: njn Date: 2009-02-23 04:14:34 +0000 (Mon, 23 Feb 2009) New Revision: 9234 Log: Merged r9205, r9205, r9207 (add rename oset_test as unit_oset, and add unit_libcbase) from trunk. Also changed it so failing tests print a message rather than asserting. Also removed some 'const' qualifiers from m_libcbase to match the trunk. Added: branches/DARWIN/memcheck/tests/unit_libcbase.c branches/DARWIN/memcheck/tests/unit_libcbase.stderr.exp branches/DARWIN/memcheck/tests/unit_libcbase.vgtest branches/DARWIN/memcheck/tests/unit_oset.c branches/DARWIN/memcheck/tests/unit_oset.stderr.exp branches/DARWIN/memcheck/tests/unit_oset.stdout.exp branches/DARWIN/memcheck/tests/unit_oset.vgtest Removed: branches/DARWIN/memcheck/tests/oset_test.c branches/DARWIN/memcheck/tests/oset_test.stderr.exp branches/DARWIN/memcheck/tests/oset_test.stdout.exp branches/DARWIN/memcheck/tests/oset_test.vgtest Modified: branches/DARWIN/coregrind/m_libcbase.c branches/DARWIN/include/pub_tool_libcbase.h branches/DARWIN/include/pub_tool_options.h branches/DARWIN/include/pub_tool_oset.h branches/DARWIN/memcheck/mc_main.c branches/DARWIN/memcheck/tests/Makefile.am [... diff too large to include ...] |
|
From: Tom H. <th...@cy...> - 2009-02-23 03:35:57
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-02-23 03:20:03 GMT
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... done
Regression test results follow
== 489 tests, 0 stderr failures, 0 stdout failures, 0 post failures ==
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... failed
Last 20 lines of verbose log follow echo
rm -f priv/main/vex_svnversion.h
cat quote.txt >> priv/main/vex_svnversion.h
svnversion -n . >> priv/main/vex_svnversion.h
cat quote.txt >> priv/main/vex_svnversion.h
cat newline.txt >> priv/main/vex_svnversion.h
make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
make -C ../VEX CC="gcc" AR="/usr/bin/ar" \
libvex_x86_linux.a \
EXTRA_CFLAGS=" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wdeclaration-after-statement \
-fno-stack-protector"
make[4]: Entering directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
make[4]: *** No rule to make target `libvex_x86_linux.a'. Stop.
make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
make[3]: *** [../VEX/libvex_x86_linux.a] Error 2
make[3]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Mon Feb 23 03:21:43 2009
--- new.short Mon Feb 23 03:35:50 2009
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- rm -f priv/main/vex_svnversion.h
- cat quote.txt >> priv/main/vex_svnversion.h
- svnversion -n . >> priv/main/vex_svnversion.h
- cat quote.txt >> priv/main/vex_svnversion.h
- cat newline.txt >> priv/main/vex_svnversion.h
- make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
- make -C ../VEX CC="gcc" AR="/usr/bin/ar" \
- libvex_x86_linux.a \
- EXTRA_CFLAGS=" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wdeclaration-after-statement \
- -fno-stack-protector"
- make[4]: Entering directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
- make[4]: *** No rule to make target `libvex_x86_linux.a'. Stop.
- make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
- make[3]: *** [../VEX/libvex_x86_linux.a] Error 2
- make[3]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
- make[2]: *** [all-recursive] Error 1
- make[2]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind'
- make: *** [all] Error 2
--- 3,10 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... done
!
! Regression test results follow
!
! == 489 tests, 0 stderr failures, 0 stdout failures, 0 post failures ==
|
|
From: <sv...@va...> - 2009-02-23 03:31:14
|
Author: njn
Date: 2009-02-23 03:31:04 +0000 (Mon, 23 Feb 2009)
New Revision: 9233
Log:
These files should have been removed in an earlier merge.
Removed:
branches/DARWIN/helgrind/tests/pth_barrier.c
branches/DARWIN/helgrind/tests/rwlock_race.c
branches/DARWIN/helgrind/tests/rwlock_test.c
Deleted: branches/DARWIN/helgrind/tests/pth_barrier.c
===================================================================
--- branches/DARWIN/helgrind/tests/pth_barrier.c 2009-02-23 03:30:27 UTC (rev 9232)
+++ branches/DARWIN/helgrind/tests/pth_barrier.c 2009-02-23 03:31:04 UTC (rev 9233)
@@ -1,110 +0,0 @@
-/* Test whether all data races are detected in a multithreaded program with
- * barriers.
- */
-
-
-#define _GNU_SOURCE
-
-/***********************/
-/* Include directives. */
-/***********************/
-
-#include <assert.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/*********************/
-/* Type definitions. */
-/*********************/
-
-struct threadinfo
-{
- pthread_barrier_t* b;
- pthread_t tid;
- int* array;
- int iterations;
-};
-
-
-/********************/
-/* Local variables. */
-/********************/
-
-static int s_silent;
-
-
-/*************************/
-/* Function definitions. */
-/*************************/
-
-/** Single thread, which touches p->iterations elements of array p->array.
- * Each modification of an element of p->array is a data race. */
-static void* threadfunc(struct threadinfo* p)
-{
- int i;
- int* const array = p->array;
- pthread_barrier_t* const b = p->b;
- if (! s_silent)
- printf("thread %lx iteration 0\n", pthread_self());
- pthread_barrier_wait(b);
- for (i = 0; i < p->iterations; i++)
- {
- if (! s_silent)
- printf("thread %lx iteration %d; writing to %p\n",
- pthread_self(), i + 1, &array[i]);
- array[i] = i;
- pthread_barrier_wait(b);
- }
- return 0;
-}
-
-/** Actual test, consisting of nthread threads. */
-static void barriers_and_races(const int nthread, const int iterations)
-{
- int i;
- struct threadinfo* t;
- pthread_barrier_t b;
- int* array;
-
- t = malloc(nthread * sizeof(struct threadinfo));
- array = malloc(iterations * sizeof(array[0]));
-
- if (! s_silent)
- printf("&array[0] = %p\n", array);
-
- pthread_barrier_init(&b, 0, nthread);
-
- for (i = 0; i < nthread; i++)
- {
- t[i].b = &b;
- t[i].array = array;
- t[i].iterations = iterations;
- pthread_create(&t[i].tid, 0, (void*(*)(void*))threadfunc, &t[i]);
- }
-
- for (i = 0; i < nthread; i++)
- {
- pthread_join(t[i].tid, 0);
- }
-
- pthread_barrier_destroy(&b);
-
- free(array);
- free(t);
-}
-
-int main(int argc, char** argv)
-{
- int nthread;
- int iterations;
-
- nthread = (argc > 1) ? atoi(argv[1]) : 2;
- iterations = (argc > 2) ? atoi(argv[2]) : 3;
- s_silent = (argc > 3) ? atoi(argv[3]) : 0;
-
- barriers_and_races(nthread, iterations);
-
- return 0;
-}
Deleted: branches/DARWIN/helgrind/tests/rwlock_race.c
===================================================================
--- branches/DARWIN/helgrind/tests/rwlock_race.c 2009-02-23 03:30:27 UTC (rev 9232)
+++ branches/DARWIN/helgrind/tests/rwlock_race.c 2009-02-23 03:31:04 UTC (rev 9233)
@@ -1,56 +0,0 @@
-/** Cause a race inside code protected by a reader lock.
- */
-
-
-/* Needed for older glibc's (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 <unistd.h>
-
-
-
-static pthread_rwlock_t s_rwlock;
-static int s_racy;
-
-static void sleep_ms(const int ms)
-{
- struct timespec delay = { ms / 1000, (ms % 1000) * 1000 * 1000 };
- nanosleep(&delay, 0);
-}
-
-static void* thread_func(void* arg)
-{
- pthread_rwlock_rdlock(&s_rwlock);
- s_racy++;
- pthread_rwlock_unlock(&s_rwlock);
- sleep_ms(100);
- return 0;
-}
-
-int main(int argc, char** argv)
-{
- pthread_t thread1;
- pthread_t thread2;
-
-#if 0
- int res;
- VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__DRD_TRACE_ADDR,
- &s_racy, 0, 0, 0, 0);
-#endif
-
- pthread_rwlock_init(&s_rwlock, 0);
- pthread_create(&thread1, 0, thread_func, 0);
- pthread_create(&thread2, 0, thread_func, 0);
- pthread_join(thread1, 0);
- pthread_join(thread2, 0);
- pthread_rwlock_destroy(&s_rwlock);
-
- fprintf(stderr, "Result: %d\n", s_racy);
-
- return 0;
-}
Deleted: branches/DARWIN/helgrind/tests/rwlock_test.c
===================================================================
--- branches/DARWIN/helgrind/tests/rwlock_test.c 2009-02-23 03:30:27 UTC (rev 9232)
+++ branches/DARWIN/helgrind/tests/rwlock_test.c 2009-02-23 03:31:04 UTC (rev 9233)
@@ -1,52 +0,0 @@
-/** Multithreaded test program that triggers various access patterns without
- * triggering any race conditions.
- */
-
-
-#define _GNU_SOURCE 1
-
-#include <pthread.h>
-#include <stdio.h>
-
-
-static pthread_rwlock_t s_rwlock;
-static int s_counter;
-
-static void* thread_func(void* arg)
-{
- int i;
- int sum = 0;
-
- for (i = 0; i < 1000; i++)
- {
- pthread_rwlock_rdlock(&s_rwlock);
- sum += s_counter;
- pthread_rwlock_unlock(&s_rwlock);
- pthread_rwlock_wrlock(&s_rwlock);
- s_counter++;
- pthread_rwlock_unlock(&s_rwlock);
- }
-
- return 0;
-}
-
-int main(int argc, char** argv)
-{
- const int thread_count = 10;
- pthread_t tid[thread_count];
- int i;
-
- for (i = 0; i < thread_count; i++)
- {
- pthread_create(&tid[i], 0, thread_func, 0);
- }
-
- for (i = 0; i < thread_count; i++)
- {
- pthread_join(tid[i], 0);
- }
-
- fprintf(stderr, "Finished.\n");
-
- return 0;
-}
|
Author: njn
Date: 2009-02-23 03:30:27 +0000 (Mon, 23 Feb 2009)
New Revision: 9232
Log:
Merged r9208..r9216 (DRD changes, plus a couple of other minor things) from
the trunk.
Added:
branches/DARWIN/drd/tests/pth_barrier_race.c
branches/DARWIN/drd/tests/pth_barrier_race.stderr.exp
branches/DARWIN/drd/tests/pth_barrier_race.vgtest
Modified:
branches/DARWIN/coregrind/m_oset.c
branches/DARWIN/drd/Testing.txt
branches/DARWIN/drd/docs/drd-manual.xml
branches/DARWIN/drd/drd_barrier.c
branches/DARWIN/drd/drd_barrier.h
branches/DARWIN/drd/drd_clientobj.c
branches/DARWIN/drd/drd_clientobj.h
branches/DARWIN/drd/drd_clientreq.c
branches/DARWIN/drd/drd_clientreq.h
branches/DARWIN/drd/drd_cond.c
branches/DARWIN/drd/drd_cond.h
branches/DARWIN/drd/drd_error.c
branches/DARWIN/drd/drd_error.h
branches/DARWIN/drd/drd_mutex.c
branches/DARWIN/drd/drd_mutex.h
branches/DARWIN/drd/drd_pthread_intercepts.c
branches/DARWIN/drd/drd_rwlock.c
branches/DARWIN/drd/drd_rwlock.h
branches/DARWIN/drd/drd_semaphore.c
branches/DARWIN/drd/drd_semaphore.h
branches/DARWIN/drd/drd_thread.c
branches/DARWIN/drd/tests/
branches/DARWIN/drd/tests/Makefile.am
branches/DARWIN/drd/tests/bar_bad.stderr.exp
branches/DARWIN/drd/tests/tc04_free_lock.stderr.exp
branches/DARWIN/drd/tests/tc09_bad_unlock.stderr.exp
branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.3
branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5
branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc
branches/DARWIN/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc
branches/DARWIN/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8
branches/DARWIN/massif/tests/
branches/DARWIN/memcheck/tests/
branches/DARWIN/memcheck/tests/linux/
branches/DARWIN/memcheck/tests/x86-linux/
branches/DARWIN/none/tests/linux/
branches/DARWIN/tests/
Modified: branches/DARWIN/coregrind/m_oset.c
===================================================================
--- branches/DARWIN/coregrind/m_oset.c 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/coregrind/m_oset.c 2009-02-23 03:30:27 UTC (rev 9232)
@@ -808,9 +808,6 @@
if (oset->cmp) {
cmpresS = (Word)slow_cmp(oset, k, t);
} else {
- /* this is believed to be correct, but really needs testing
- before the assertion is removed. */
- vg_assert(0);
cmpresS = fast_cmp(k, t);
}
Modified: branches/DARWIN/drd/Testing.txt
===================================================================
--- branches/DARWIN/drd/Testing.txt 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/Testing.txt 2009-02-23 03:30:27 UTC (rev 9232)
@@ -1,28 +1,34 @@
How to test DRD
~~~~~~~~~~~~~~~
-1. Run the regression tests. After having compiled DRD, run the following
- command:
+1. Start with compiling DRD.
+2. Check as follows that all global symbols in DRD have been wrapped by the
+ DRD_() macro (output must be empty):
+ nm -A drd*.o|grep ' T '|grep -v ' T vgDrd_'
+3. Check as follows that all global symbols in the preloaded shared library
+ are redirected functions (output must be empty):
+ nm -A vgpreload*.o|grep ' T '|grep -v ' T _vg'
+4. Run the regression tests as follows:
perl tests/vg_regtest drd
-2. Run Konstantin's regression tests:
+5. Run Konstantin's regression tests:
svn checkout http://data-race-test.googlecode.com/svn/trunk drt
make -C drt/unittest -s build
./vg-in-place --tool=drd --check-stack-var=yes drt/unittest/racecheck_unittest 2>&1|less
-3. Test the slowdown for matinv for various matrix sizes via the script
+6. Test the slowdown for matinv for various matrix sizes via the script
drd/scripts/run-matinv (must be about 24 for i == 1 and about
31 for i == 10 with n == 200).
-4. Test whether DRD works with standard KDE applications and whether it does
+7. Test whether DRD works with standard KDE applications and whether it does
not print any false positives. Test this both with KDE3 and KDE4.
./vg-in-place --tool=drd --var-info=yes kate
./vg-in-place --tool=drd --var-info=yes --check-stack-var=yes kate
./vg-in-place --tool=drd --var-info=yes --trace-children=yes knode
./vg-in-place --tool=drd --var-info=yes --check-stack-var=yes --trace-children=yes knode
./vg-in-place --tool=drd --var-info=yes --check-stack-var=yes /usr/bin/designer
-5. Test whether DRD works with standard GNOME applications. Expect
+8. Test whether DRD works with standard GNOME applications. Expect
race reports triggered by ORBit_RootObject_duplicate() and after
having closed the GNOME terminal window:
./vg-in-place --tool=drd --var-info=yes --trace-children=yes gnome-terminal
-6. Test DRD with Firefox. First of all, make sure that Valgrind is patched
+9. Test DRD with Firefox. First of all, make sure that Valgrind is patched
such that it supports libjemalloc.so:
drd/scripts/add-libjemalloc-support
Next, build and install Firefox 3:
Modified: branches/DARWIN/drd/docs/drd-manual.xml
===================================================================
--- branches/DARWIN/drd/docs/drd-manual.xml 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/docs/drd-manual.xml 2009-02-23 03:30:27 UTC (rev 9232)
@@ -799,6 +799,11 @@
</listitem>
<listitem>
<para>
+ Missing synchronization between barrier wait and barrier destruction.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
Exiting a thread without first unlocking the spinlocks,
mutexes or reader-writer locks that were locked by that
thread.
Modified: branches/DARWIN/drd/drd_barrier.c
===================================================================
--- branches/DARWIN/drd/drd_barrier.c 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_barrier.c 2009-02-23 03:30:27 UTC (rev 9232)
@@ -40,57 +40,75 @@
/** Information associated with one thread participating in a barrier. */
struct barrier_thread_info
{
- UWord tid; // A DrdThreadId
+ UWord tid; // A DrdThreadId declared as UWord because
+ // this member variable is the key of an OSet.
Word iteration; // iteration of last pthread_barrier_wait()
// call thread tid participated in.
Segment* sg[2]; // Segments of the last two
// pthread_barrier() calls by thread tid.
+ ExeContext* wait_call_ctxt;// call stack for *_barrier_wait() call.
+ Segment* post_wait_sg; // Segment created after *_barrier_wait() finished
};
/* Local functions. */
-static void DRD_(barrier_cleanup)(struct barrier_info* p);
-static const char* DRD_(barrier_get_typename)(struct barrier_info* const p);
-static const char* DRD_(barrier_type_name)(const BarrierT bt);
+static void barrier_cleanup(struct barrier_info* p);
+static void barrier_delete_thread(struct barrier_info* const p,
+ const DrdThreadId tid);
+static const char* barrier_get_typename(struct barrier_info* const p);
+static const char* barrier_type_name(const BarrierT bt);
+static
+void barrier_report_wait_delete_race(const struct barrier_info* const p,
+ const struct barrier_thread_info* const q);
/* Local variables. */
-static Bool DRD_(s_trace_barrier) = False;
-static ULong DRD_(s_barrier_segment_creation_count);
+static Bool s_trace_barrier = False;
+static ULong s_barrier_segment_creation_count;
/* Function definitions. */
void DRD_(barrier_set_trace)(const Bool trace_barrier)
{
- DRD_(s_trace_barrier) = trace_barrier;
+ s_trace_barrier = trace_barrier;
}
-/** Initialize the structure *p with the specified thread ID and iteration
- * information. */
+/**
+ * Initialize the structure *p with the specified thread ID and iteration
+ * information.
+ */
static
void DRD_(barrier_thread_initialize)(struct barrier_thread_info* const p,
const DrdThreadId tid,
const Word iteration)
{
- p->tid = tid;
- p->iteration = iteration;
- p->sg[0] = 0;
- p->sg[1] = 0;
+ p->tid = tid;
+ p->iteration = iteration;
+ p->sg[0] = 0;
+ p->sg[1] = 0;
+ p->wait_call_ctxt = 0;
+ p->post_wait_sg = 0;
}
-/** Deallocate the memory that was allocated in barrier_thread_initialize(). */
+/**
+ * Deallocate the memory that is owned by members of
+ * struct barrier_thread_info.
+ */
static void DRD_(barrier_thread_destroy)(struct barrier_thread_info* const p)
{
tl_assert(p);
DRD_(sg_put)(p->sg[0]);
DRD_(sg_put)(p->sg[1]);
+ DRD_(sg_put)(p->post_wait_sg);
}
-/** Initialize the structure *p with the specified client-side barrier address,
- * barrier object size and number of participants in each barrier. */
+/**
+ * Initialize the structure *p with the specified client-side barrier address,
+ * barrier object size and number of participants in each barrier.
+ */
static
void DRD_(barrier_initialize)(struct barrier_info* const p,
const Addr barrier,
@@ -101,13 +119,16 @@
tl_assert(barrier_type == pthread_barrier || barrier_type == gomp_barrier);
tl_assert(p->a1 == barrier);
- p->cleanup = (void(*)(DrdClientobj*))DRD_(barrier_cleanup);
+ p->cleanup = (void(*)(DrdClientobj*))barrier_cleanup;
+ p->delete_thread
+ = (void(*)(DrdClientobj*, DrdThreadId))barrier_delete_thread;
p->barrier_type = barrier_type;
p->count = count;
p->pre_iteration = 0;
p->post_iteration = 0;
p->pre_waiters_left = count;
p->post_waiters_left = count;
+
tl_assert(sizeof(((struct barrier_thread_info*)0)->tid) == sizeof(Word));
tl_assert(sizeof(((struct barrier_thread_info*)0)->tid)
>= sizeof(DrdThreadId));
@@ -116,18 +137,21 @@
}
/**
- * Deallocate the memory allocated by barrier_initialize() and in p->oset.
+ * Deallocate the memory owned by the struct barrier_info object and also
+ * all the nodes in the OSet p->oset.
+ *
* Called by clientobj_destroy().
*/
-void DRD_(barrier_cleanup)(struct barrier_info* p)
+static void barrier_cleanup(struct barrier_info* p)
{
struct barrier_thread_info* q;
+ Segment* latest_sg = 0;
tl_assert(p);
if (p->pre_waiters_left != p->count)
{
- BarrierErrInfo bei = { p->a1 };
+ BarrierErrInfo bei = { p->a1, 0, 0 };
VG_(maybe_record_error)(VG_(get_running_tid)(),
BarrierErr,
VG_(get_IP)(VG_(get_running_tid)()),
@@ -136,16 +160,29 @@
&bei);
}
+ DRD_(thread_get_latest_segment)(&latest_sg, DRD_(thread_get_running_tid)());
+ tl_assert(latest_sg);
+
VG_(OSetGen_ResetIter)(p->oset);
for ( ; (q = VG_(OSetGen_Next)(p->oset)) != 0; )
{
+ if (q->post_wait_sg
+ && ! DRD_(vc_lte)(&q->post_wait_sg->vc, &latest_sg->vc))
+ {
+ barrier_report_wait_delete_race(p, q);
+ }
+
DRD_(barrier_thread_destroy)(q);
}
VG_(OSetGen_Destroy)(p->oset);
+
+ DRD_(sg_put)(latest_sg);
}
-/** Look up the client-side barrier address barrier in s_barrier[]. If not
- * found, add it. */
+/**
+ * Look up the client-side barrier address barrier in s_barrier[]. If not
+ * found, add it.
+ */
static
struct barrier_info*
DRD_(barrier_get_or_allocate)(const Addr barrier,
@@ -165,17 +202,21 @@
return p;
}
-/** Look up the address of the information associated with the client-side
- * barrier object. */
+/**
+ * Look up the address of the information associated with the client-side
+ * barrier object.
+ */
static struct barrier_info* DRD_(barrier_get)(const Addr barrier)
{
tl_assert(offsetof(DrdClientobj, barrier) == 0);
return &(DRD_(clientobj_get)(barrier, ClientBarrier)->barrier);
}
-/** Initialize a barrier with client address barrier, client size size, and
- * where count threads participate in each barrier.
- * Called before pthread_barrier_init().
+/**
+ * Initialize a barrier with client address barrier, client size size, and
+ * where count threads participate in each barrier.
+ *
+ * Called before pthread_barrier_init().
*/
void DRD_(barrier_init)(const Addr barrier,
const BarrierT barrier_type, const Word count,
@@ -187,7 +228,7 @@
if (count == 0)
{
- BarrierErrInfo bei = { barrier };
+ BarrierErrInfo bei = { barrier, 0, 0 };
VG_(maybe_record_error)(VG_(get_running_tid)(),
BarrierErr,
VG_(get_IP)(VG_(get_running_tid)()),
@@ -200,7 +241,7 @@
p = DRD_(barrier_get)(barrier);
if (p)
{
- BarrierErrInfo bei = { barrier };
+ BarrierErrInfo bei = { barrier, 0, 0 };
VG_(maybe_record_error)(VG_(get_running_tid)(),
BarrierErr,
VG_(get_IP)(VG_(get_running_tid)()),
@@ -210,7 +251,7 @@
}
p = DRD_(barrier_get_or_allocate)(barrier, barrier_type, count);
- if (DRD_(s_trace_barrier))
+ if (s_trace_barrier)
{
if (reinitialization)
{
@@ -218,7 +259,7 @@
"[%d/%d] barrier_reinit %s 0x%lx count %ld -> %ld",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
- DRD_(barrier_get_typename)(p),
+ barrier_get_typename(p),
barrier,
p->count,
count);
@@ -229,7 +270,7 @@
"[%d/%d] barrier_init %s 0x%lx",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
- DRD_(barrier_get_typename)(p),
+ barrier_get_typename(p),
barrier);
}
}
@@ -238,7 +279,7 @@
{
if (p->pre_waiters_left != p->count || p->post_waiters_left != p->count)
{
- BarrierErrInfo bei = { p->a1 };
+ BarrierErrInfo bei = { p->a1, 0, 0 };
VG_(maybe_record_error)(VG_(get_running_tid)(),
BarrierErr,
VG_(get_IP)(VG_(get_running_tid)()),
@@ -250,20 +291,20 @@
}
}
-/** Called after pthread_barrier_destroy(). */
+/** Called after pthread_barrier_destroy() / gomp_barrier_destroy(). */
void DRD_(barrier_destroy)(const Addr barrier, const BarrierT barrier_type)
{
struct barrier_info* p;
p = DRD_(barrier_get)(barrier);
- if (DRD_(s_trace_barrier))
+ if (s_trace_barrier)
{
VG_(message)(Vg_UserMsg,
"[%d/%d] barrier_destroy %s 0x%lx",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
- DRD_(barrier_get_typename)(p),
+ barrier_get_typename(p),
barrier);
}
@@ -280,7 +321,7 @@
if (p->pre_waiters_left != p->count || p->post_waiters_left != p->count)
{
- BarrierErrInfo bei = { p->a1 };
+ BarrierErrInfo bei = { p->a1, 0, 0 };
VG_(maybe_record_error)(VG_(get_running_tid)(),
BarrierErr,
VG_(get_IP)(VG_(get_running_tid)()),
@@ -291,7 +332,7 @@
DRD_(clientobj_remove)(p->a1, ClientBarrier);
}
-/** Called before pthread_barrier_wait(). */
+/** Called before pthread_barrier_wait() / gomp_barrier_wait(). */
void DRD_(barrier_pre_wait)(const DrdThreadId tid, const Addr barrier,
const BarrierT barrier_type)
{
@@ -302,6 +343,11 @@
p = DRD_(barrier_get)(barrier);
if (p == 0 && barrier_type == gomp_barrier)
{
+ /*
+ * gomp_barrier_wait() call has been intercepted but gomp_barrier_init()
+ * not. The only cause I know of that can trigger this is that libgomp.so
+ * has been compiled with --enable-linux-futex.
+ */
VG_(message)(Vg_UserMsg, "");
VG_(message)(Vg_UserMsg,
"Please verify whether gcc has been configured"
@@ -312,17 +358,18 @@
}
tl_assert(p);
- if (DRD_(s_trace_barrier))
+ if (s_trace_barrier)
{
VG_(message)(Vg_UserMsg,
"[%d/%d] barrier_pre_wait %s 0x%lx iteration %ld",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
- DRD_(barrier_get_typename)(p),
+ barrier_get_typename(p),
barrier,
p->pre_iteration);
}
+ /* Allocate the per-thread data structure if necessary. */
q = VG_(OSetGen_Lookup)(p->oset, &word_tid);
if (q == 0)
{
@@ -331,8 +378,21 @@
VG_(OSetGen_Insert)(p->oset, q);
tl_assert(VG_(OSetGen_Lookup)(p->oset, &word_tid) == q);
}
+
+ /* Record *_barrier_wait() call context. */
+ q->wait_call_ctxt = VG_(record_ExeContext)(VG_(get_running_tid)(), 0);
+
+ /*
+ * Store a pointer to the latest segment of the current thread in the
+ * per-thread data structure.
+ */
DRD_(thread_get_latest_segment)(&q->sg[p->pre_iteration], tid);
+ /*
+ * If the same number of threads as the barrier count indicates have
+ * called the pre *_barrier_wait() wrapper, toggle p->pre_iteration and
+ * reset the p->pre_waiters_left counter.
+ */
if (--p->pre_waiters_left <= 0)
{
p->pre_iteration = 1 - p->pre_iteration;
@@ -340,107 +400,148 @@
}
}
-/** Called after pthread_barrier_wait(). */
+/** Called after pthread_barrier_wait() / gomp_barrier_wait(). */
void DRD_(barrier_post_wait)(const DrdThreadId tid, const Addr barrier,
- const BarrierT barrier_type, const Bool waited)
+ const BarrierT barrier_type, const Bool waited,
+ const Bool serializing)
{
struct barrier_info* p;
+ const UWord word_tid = tid;
+ struct barrier_thread_info* q;
+ struct barrier_thread_info* r;
p = DRD_(barrier_get)(barrier);
- if (DRD_(s_trace_barrier))
+ if (s_trace_barrier)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] barrier_post_wait %s 0x%lx iteration %ld",
+ "[%d/%d] barrier_post_wait %s 0x%lx iteration %ld%s",
VG_(get_running_tid)(),
tid,
- p ? DRD_(barrier_get_typename)(p) : "(?)",
+ p ? barrier_get_typename(p) : "(?)",
barrier,
- p ? p->post_iteration : -1);
+ p ? p->post_iteration : -1,
+ serializing ? " (serializing)" : "");
}
- /* If p == 0, this means that the barrier has been destroyed after */
- /* *_barrier_wait() returned and before this function was called. Just */
- /* return in that case. */
+ /*
+ * If p == 0, this means that the barrier has been destroyed after
+ * *_barrier_wait() returned and before this function was called. Just
+ * return in that case -- race conditions between *_barrier_wait()
+ * and *_barrier_destroy() are detected by the *_barrier_destroy() wrapper.
+ */
if (p == 0)
return;
- if (waited)
+ /* If the *_barrier_wait() call returned an error code, exit. */
+ if (! waited)
+ return;
+
+ q = VG_(OSetGen_Lookup)(p->oset, &word_tid);
+ if (q == 0)
{
- const UWord word_tid = tid;
- struct barrier_thread_info* q;
- struct barrier_thread_info* r;
+ BarrierErrInfo bei = { p->a1, 0, 0 };
+ VG_(maybe_record_error)(VG_(get_running_tid)(),
+ BarrierErr,
+ VG_(get_IP)(VG_(get_running_tid)()),
+ "Error in barrier implementation"
+ " -- barrier_wait() started before"
+ " barrier_destroy() and finished after"
+ " barrier_destroy()",
+ &bei);
- q = VG_(OSetGen_Lookup)(p->oset, &word_tid);
- if (q == 0)
+ q = VG_(OSetGen_AllocNode)(p->oset, sizeof(*q));
+ DRD_(barrier_thread_initialize)(q, tid, p->pre_iteration);
+ VG_(OSetGen_Insert)(p->oset, q);
+ tl_assert(VG_(OSetGen_Lookup)(p->oset, &word_tid) == q);
+ }
+ /*
+ * Combine all vector clocks that were stored in the pre_barrier_wait
+ * wrapper with the vector clock of the current thread.
+ */
+ VG_(OSetGen_ResetIter)(p->oset);
+ for ( ; (r = VG_(OSetGen_Next)(p->oset)) != 0; )
+ {
+ if (r != q)
{
- BarrierErrInfo bei = { p->a1 };
- VG_(maybe_record_error)(VG_(get_running_tid)(),
- BarrierErr,
- VG_(get_IP)(VG_(get_running_tid)()),
- "Error in barrier implementation"
- " -- barrier_wait() started before"
- " barrier_destroy() and finished after"
- " barrier_destroy()",
- &bei);
-
- q = VG_(OSetGen_AllocNode)(p->oset, sizeof(*q));
- DRD_(barrier_thread_initialize)(q, tid, p->pre_iteration);
- VG_(OSetGen_Insert)(p->oset, q);
- tl_assert(VG_(OSetGen_Lookup)(p->oset, &word_tid) == q);
+ tl_assert(r->sg[p->post_iteration]);
+ DRD_(thread_combine_vc2)(tid, &r->sg[p->post_iteration]->vc);
}
- VG_(OSetGen_ResetIter)(p->oset);
- for ( ; (r = VG_(OSetGen_Next)(p->oset)) != 0; )
- {
- if (r != q)
- {
- tl_assert(r->sg[p->post_iteration]);
- DRD_(thread_combine_vc2)(tid, &r->sg[p->post_iteration]->vc);
- }
- }
+ }
- DRD_(thread_new_segment)(tid);
- DRD_(s_barrier_segment_creation_count)++;
+ /* Create a new segment and store a pointer to that segment. */
+ DRD_(thread_new_segment)(tid);
+ DRD_(thread_get_latest_segment)(&q->post_wait_sg, tid);
+ s_barrier_segment_creation_count++;
- if (--p->post_waiters_left <= 0)
- {
- p->post_iteration = 1 - p->post_iteration;
- p->post_waiters_left = p->count;
- }
+ /*
+ * If the same number of threads as the barrier count indicates have
+ * called the post *_barrier_wait() wrapper, toggle p->post_iteration and
+ * reset the p->post_waiters_left counter.
+ */
+ if (--p->post_waiters_left <= 0)
+ {
+ p->post_iteration = 1 - p->post_iteration;
+ p->post_waiters_left = p->count;
}
}
-/** Call this function when thread tid stops to exist. */
-void DRD_(barrier_thread_delete)(const DrdThreadId tid)
+/** Called when thread tid stops to exist. */
+static void barrier_delete_thread(struct barrier_info* const p,
+ const DrdThreadId tid)
{
- struct barrier_info* p;
+ struct barrier_thread_info* q;
+ const UWord word_tid = tid;
- DRD_(clientobj_resetiter)();
- for ( ; (p = &(DRD_(clientobj_next)(ClientBarrier)->barrier)) != 0; )
+ q = VG_(OSetGen_Remove)(p->oset, &word_tid);
+
+ /*
+ * q is only non-zero if the barrier object has been used by thread tid
+ * after the barrier_init() call and before the thread finished.
+ */
+ if (q)
{
- struct barrier_thread_info* q;
- const UWord word_tid = tid;
- q = VG_(OSetGen_Remove)(p->oset, &word_tid);
- /* q is only non-zero if the barrier object has been used by thread tid
- * after the barrier_init() call and before the thread finished.
- */
- if (q)
- {
- DRD_(barrier_thread_destroy)(q);
- VG_(OSetGen_FreeNode)(p->oset, q);
- }
+ DRD_(barrier_thread_destroy)(q);
+ VG_(OSetGen_FreeNode)(p->oset, q);
}
}
-static const char* DRD_(barrier_get_typename)(struct barrier_info* const p)
+/**
+ * Report that *_barrier_destroy() has been called but that this call was
+ * not synchronized with the last *_barrier_wait() call on the same barrier.
+ *
+ * This topic has been discussed extensively on comp.programming.threads
+ * (February 3, 2009). See also
+ * <a href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/4f65535d6192aa50/a5f4bf1e3b437c4d">Immediately destroying pthread barriers</a>.
+ */
+static
+void barrier_report_wait_delete_race(const struct barrier_info* const p,
+ const struct barrier_thread_info* const q)
{
tl_assert(p);
+ tl_assert(q);
- return DRD_(barrier_type_name)(p->barrier_type);
+ {
+ BarrierErrInfo bei
+ = { p->a1, q->tid, q->wait_call_ctxt };
+ VG_(maybe_record_error)(VG_(get_running_tid)(),
+ BarrierErr,
+ VG_(get_IP)(VG_(get_running_tid)()),
+ "Destruction of barrier not synchronized with"
+ " barrier wait call",
+ &bei);
+ }
}
-static const char* DRD_(barrier_type_name)(const BarrierT bt)
+static const char* barrier_get_typename(struct barrier_info* const p)
{
+ tl_assert(p);
+
+ return barrier_type_name(p->barrier_type);
+}
+
+static const char* barrier_type_name(const BarrierT bt)
+{
switch (bt)
{
case pthread_barrier:
@@ -453,5 +554,5 @@
ULong DRD_(get_barrier_segment_creation_count)(void)
{
- return DRD_(s_barrier_segment_creation_count);
+ return s_barrier_segment_creation_count;
}
Modified: branches/DARWIN/drd/drd_barrier.h
===================================================================
--- branches/DARWIN/drd/drd_barrier.h 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_barrier.h 2009-02-23 03:30:27 UTC (rev 9232)
@@ -45,8 +45,8 @@
void DRD_(barrier_pre_wait)(const DrdThreadId tid, const Addr barrier,
const BarrierT barrier_type);
void DRD_(barrier_post_wait)(const DrdThreadId tid, const Addr barrier,
- const BarrierT barrier_type, const Bool waited);
-void DRD_(barrier_thread_delete)(const DrdThreadId threadid);
+ const BarrierT barrier_type, const Bool waited,
+ const Bool serializing);
void DRD_(barrier_stop_using_mem)(const Addr a1, const Addr a2);
ULong DRD_(get_barrier_segment_creation_count)(void);
Modified: branches/DARWIN/drd/drd_clientobj.c
===================================================================
--- branches/DARWIN/drd/drd_clientobj.c 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_clientobj.c 2009-02-23 03:30:27 UTC (rev 9232)
@@ -37,26 +37,29 @@
/* Local variables. */
-static OSet* DRD_(s_clientobj_set);
-static Bool DRD_(s_trace_clientobj);
+static OSet* s_clientobj_set;
+static Bool s_trace_clientobj;
+/* Local functions. */
+
+static Bool clientobj_remove_obj(DrdClientobj* const p);
+
+
/* Function definitions. */
void DRD_(clientobj_set_trace)(const Bool trace)
{
- DRD_(s_trace_clientobj) = trace;
+ s_trace_clientobj = trace;
}
/** Initialize the client object set. */
void DRD_(clientobj_init)(void)
{
- tl_assert(DRD_(s_clientobj_set) == 0);
- DRD_(s_clientobj_set) = VG_(OSetGen_Create)(0, 0,
- VG_(malloc),
- "drd.clientobj.ci.1",
- VG_(free));
- tl_assert(DRD_(s_clientobj_set));
+ tl_assert(s_clientobj_set == 0);
+ s_clientobj_set = VG_(OSetGen_Create)(0, 0, VG_(malloc),
+ "drd.clientobj.ci.1", VG_(free));
+ tl_assert(s_clientobj_set);
}
/**
@@ -66,29 +69,31 @@
*/
void DRD_(clientobj_cleanup)(void)
{
- tl_assert(DRD_(s_clientobj_set));
- tl_assert(VG_(OSetGen_Size)(DRD_(s_clientobj_set)) == 0);
- VG_(OSetGen_Destroy)(DRD_(s_clientobj_set));
- DRD_(s_clientobj_set) = 0;
+ tl_assert(s_clientobj_set);
+ tl_assert(VG_(OSetGen_Size)(s_clientobj_set) == 0);
+ VG_(OSetGen_Destroy)(s_clientobj_set);
+ s_clientobj_set = 0;
}
-/** Return the data associated with the client object at client address addr.
- * Return 0 if there is no client object in the set with the specified start
- * address.
+/**
+ * Return the data associated with the client object at client address addr.
+ * Return 0 if there is no client object in the set with the specified start
+ * address.
*/
DrdClientobj* DRD_(clientobj_get_any)(const Addr addr)
{
- return VG_(OSetGen_Lookup)(DRD_(s_clientobj_set), &addr);
+ return VG_(OSetGen_Lookup)(s_clientobj_set, &addr);
}
-/** Return the data associated with the client object at client address addr
- * and that has object type t. Return 0 if there is no client object in the
- * set with the specified start address.
+/**
+ * Return the data associated with the client object at client address addr
+ * and that has object type t. Return 0 if there is no client object in the
+ * set with the specified start address.
*/
DrdClientobj* DRD_(clientobj_get)(const Addr addr, const ObjType t)
{
DrdClientobj* p;
- p = VG_(OSetGen_Lookup)(DRD_(s_clientobj_set), &addr);
+ p = VG_(OSetGen_Lookup)(s_clientobj_set, &addr);
if (p && p->any.type == t)
return p;
return 0;
@@ -102,8 +107,8 @@
DrdClientobj *p;
tl_assert(a1 < a2);
- VG_(OSetGen_ResetIter)(DRD_(s_clientobj_set));
- for ( ; (p = VG_(OSetGen_Next)(DRD_(s_clientobj_set))) != 0; )
+ VG_(OSetGen_ResetIter)(s_clientobj_set);
+ for ( ; (p = VG_(OSetGen_Next)(s_clientobj_set)) != 0; )
{
if (a1 <= p->any.a1 && p->any.a1 < a2)
{
@@ -122,50 +127,64 @@
DrdClientobj* p;
tl_assert(! DRD_(clientobj_present)(a1, a1 + 1));
- tl_assert(VG_(OSetGen_Lookup)(DRD_(s_clientobj_set), &a1) == 0);
+ tl_assert(VG_(OSetGen_Lookup)(s_clientobj_set, &a1) == 0);
- if (DRD_(s_trace_clientobj))
+ if (s_trace_clientobj)
{
VG_(message)(Vg_UserMsg, "Adding client object 0x%lx of type %d", a1, t);
}
- p = VG_(OSetGen_AllocNode)(DRD_(s_clientobj_set), sizeof(*p));
+ p = VG_(OSetGen_AllocNode)(s_clientobj_set, sizeof(*p));
VG_(memset)(p, 0, sizeof(*p));
p->any.a1 = a1;
p->any.type = t;
p->any.first_observed_at = VG_(record_ExeContext)(VG_(get_running_tid)(), 0);
- VG_(OSetGen_Insert)(DRD_(s_clientobj_set), p);
- tl_assert(VG_(OSetGen_Lookup)(DRD_(s_clientobj_set), &a1) == p);
+ VG_(OSetGen_Insert)(s_clientobj_set, p);
+ tl_assert(VG_(OSetGen_Lookup)(s_clientobj_set, &a1) == p);
DRD_(start_suppression)(a1, a1 + 1, "clientobj");
return p;
}
+/**
+ * Remove the information that was stored about the client object.
+ *
+ * @param[in] addr Address of the client object in the client address space.
+ * @param[in] t Type of the client object.
+ */
Bool DRD_(clientobj_remove)(const Addr addr, const ObjType t)
{
DrdClientobj* p;
- if (DRD_(s_trace_clientobj))
+ p = VG_(OSetGen_Lookup)(s_clientobj_set, &addr);
+ tl_assert(p);
+ tl_assert(p->any.type == t);
+ return clientobj_remove_obj(p);
+}
+
+/**
+ * Remove the information that was stored about the client object p.
+ *
+ * @note The order of operations below is important. The client object is
+ * removed from the client object set after the cleanup function has been
+ * called such that if the cleanup function can still use the function
+ * DRD_(clientobj_get_any)(). This happens e.g. in the function
+ * first_observed() in drd_error.c.
+ */
+static Bool clientobj_remove_obj(DrdClientobj* const p)
+{
+ tl_assert(p);
+
+ if (s_trace_clientobj)
{
VG_(message)(Vg_UserMsg, "Removing client object 0x%lx of type %d",
- addr, t);
-#if 0
- VG_(get_and_pp_StackTrace)(VG_(get_running_tid)(),
- VG_(clo_backtrace_size));
-#endif
+ p->any.a1, p->any.type);
}
- p = VG_(OSetGen_Lookup)(DRD_(s_clientobj_set), &addr);
- tl_assert(p->any.type == t);
- p = VG_(OSetGen_Remove)(DRD_(s_clientobj_set), &addr);
- if (p)
- {
- tl_assert(VG_(OSetGen_Lookup)(DRD_(s_clientobj_set), &addr) == 0);
- tl_assert(p->any.cleanup);
- (*p->any.cleanup)(p);
- VG_(OSetGen_FreeNode)(DRD_(s_clientobj_set), p);
- return True;
- }
- return False;
+ tl_assert(p->any.cleanup);
+ (*p->any.cleanup)(p);
+ VG_(OSetGen_Remove)(s_clientobj_set, &p->any.a1);
+ VG_(OSetGen_FreeNode)(s_clientobj_set, p);
+ return True;
}
void DRD_(clientobj_stop_using_mem)(const Addr a1, const Addr a2)
@@ -173,45 +192,46 @@
Addr removed_at;
DrdClientobj* p;
- tl_assert(DRD_(s_clientobj_set));
+ tl_assert(s_clientobj_set);
if (! DRD_(is_any_suppressed)(a1, a2))
return;
- VG_(OSetGen_ResetIter)(DRD_(s_clientobj_set));
- p = VG_(OSetGen_Next)(DRD_(s_clientobj_set));
+ VG_(OSetGen_ResetIter)(s_clientobj_set);
+ p = VG_(OSetGen_Next)(s_clientobj_set);
for ( ; p != 0; )
{
if (a1 <= p->any.a1 && p->any.a1 < a2)
{
removed_at = p->any.a1;
- DRD_(clientobj_remove)(p->any.a1, p->any.type);
+ clientobj_remove_obj(p);
/* The above call removes an element from the oset and hence */
/* invalidates the iterator. Set the iterator back. */
- VG_(OSetGen_ResetIter)(DRD_(s_clientobj_set));
- while ((p = VG_(OSetGen_Next)(DRD_(s_clientobj_set))) != 0
- && p->any.a1 <= removed_at)
- { }
+ VG_(OSetGen_ResetIterAt)(s_clientobj_set, &removed_at);
}
else
{
- p = VG_(OSetGen_Next)(DRD_(s_clientobj_set));
+ p = VG_(OSetGen_Next)(s_clientobj_set);
}
}
}
-void DRD_(clientobj_resetiter)(void)
+/**
+ * Delete the per-thread information stored in client objects for the
+ * specified thread.
+ */
+void DRD_(clientobj_delete_thread)(const DrdThreadId tid)
{
- VG_(OSetGen_ResetIter)(DRD_(s_clientobj_set));
-}
+ DrdClientobj *p;
-DrdClientobj* DRD_(clientobj_next)(const ObjType t)
-{
- DrdClientobj* p;
- while ((p = VG_(OSetGen_Next)(DRD_(s_clientobj_set))) != 0
- && p->any.type != t)
- ;
- return p;
+ VG_(OSetGen_ResetIter)(s_clientobj_set);
+ for ( ; (p = VG_(OSetGen_Next)(s_clientobj_set)) != 0; )
+ {
+ if (p->any.delete_thread)
+ {
+ (*p->any.delete_thread)(p, tid);
+ }
+ }
}
const char* DRD_(clientobj_type_name)(const ObjType t)
Modified: branches/DARWIN/drd/drd_clientobj.h
===================================================================
--- branches/DARWIN/drd/drd_clientobj.h 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_clientobj.h 2009-02-23 03:30:27 UTC (rev 9232)
@@ -53,7 +53,8 @@
{
Addr a1;
ObjType type;
- void (*cleanup)(union drd_clientobj*);
+ void (*cleanup)(union drd_clientobj*);
+ void (*delete_thread)(union drd_clientobj*, DrdThreadId);
ExeContext* first_observed_at;
};
@@ -62,6 +63,7 @@
Addr a1;
ObjType type;
void (*cleanup)(union drd_clientobj*);
+ void (*delete_thread)(union drd_clientobj*, DrdThreadId);
ExeContext* first_observed_at;
MutexT mutex_type; // pthread_mutex_t or pthread_spinlock_t.
int recursion_count; // 0 if free, >= 1 if locked.
@@ -75,7 +77,8 @@
{
Addr a1;
ObjType type;
- void (*cleanup)(union drd_clientobj*);
+ void (*cleanup)(union drd_clientobj*);
+ void (*delete_thread)(union drd_clientobj*, DrdThreadId);
ExeContext* first_observed_at;
int waiter_count;
Addr mutex; // Client mutex specified in pthread_cond_wait() call, and
@@ -87,6 +90,7 @@
Addr a1;
ObjType type;
void (*cleanup)(union drd_clientobj*);
+ void (*delete_thread)(union drd_clientobj*, DrdThreadId);
ExeContext* first_observed_at;
UInt waits_to_skip; // Number of sem_wait() calls to skip
// (due to the value assigned by sem_init()).
@@ -101,14 +105,15 @@
Addr a1;
ObjType type;
void (*cleanup)(union drd_clientobj*);
+ void (*delete_thread)(union drd_clientobj*, DrdThreadId);
ExeContext* first_observed_at;
BarrierT barrier_type; // pthread_barrier or gomp_barrier.
Word count; // Participant count in a barrier wait.
- Word pre_iteration; // pthread_barrier_wait() call count modulo two.
- Word post_iteration; // pthread_barrier_wait() call count modulo two.
+ Word pre_iteration; // pre barrier completion count modulo two.
+ Word post_iteration; // post barrier completion count modulo two.
Word pre_waiters_left; // number of waiters left for a complete barrier.
Word post_waiters_left; // number of waiters left for a complete barrier.
- OSet* oset; // Thread-specific barrier information.
+ OSet* oset; // Per-thread barrier information.
};
struct rwlock_info
@@ -116,6 +121,7 @@
Addr a1;
ObjType type;
void (*cleanup)(union drd_clientobj*);
+ void (*delete_thread)(union drd_clientobj*, DrdThreadId);
ExeContext* first_observed_at;
OSet* thread_info;
ULong acquiry_time_ms;
@@ -144,8 +150,7 @@
DrdClientobj* DRD_(clientobj_add)(const Addr a1, const ObjType t);
Bool DRD_(clientobj_remove)(const Addr addr, const ObjType t);
void DRD_(clientobj_stop_using_mem)(const Addr a1, const Addr a2);
-void DRD_(clientobj_resetiter)(void);
-DrdClientobj* DRD_(clientobj_next)(const ObjType t);
+void DRD_(clientobj_delete_thread)(const DrdThreadId tid);
const char* DRD_(clientobj_type_name)(const ObjType t);
Modified: branches/DARWIN/drd/drd_clientreq.c
===================================================================
--- branches/DARWIN/drd/drd_clientreq.c 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_clientreq.c 2009-02-23 03:30:27 UTC (rev 9232)
@@ -327,7 +327,7 @@
case VG_USERREQ__POST_BARRIER_WAIT:
if (DRD_(thread_leave_synchr)(drd_tid) == 0)
- DRD_(barrier_post_wait)(drd_tid, arg[1], arg[2], arg[3]);
+ DRD_(barrier_post_wait)(drd_tid, arg[1], arg[2], arg[3], arg[4]);
break;
case VG_USERREQ__PRE_RWLOCK_INIT:
Modified: branches/DARWIN/drd/drd_clientreq.h
===================================================================
--- branches/DARWIN/drd/drd_clientreq.h 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_clientreq.h 2009-02-23 03:30:27 UTC (rev 9232)
@@ -178,7 +178,7 @@
/* args: Addr barrier, BarrierT type. */
/* To notify the drd tool of a pthread_barrier_wait call. */
VG_USERREQ__POST_BARRIER_WAIT,
- /* args: Addr barrier, BarrierT type, Word has_waited */
+ /* args: Addr barrier, BarrierT type, Word has_waited, Word serializing */
/* To notify the drd tool of a pthread_rwlock_init call. */
VG_USERREQ__PRE_RWLOCK_INIT,
Modified: branches/DARWIN/drd/drd_cond.c
===================================================================
--- branches/DARWIN/drd/drd_cond.c 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_cond.c 2009-02-23 03:30:27 UTC (rev 9232)
@@ -65,9 +65,10 @@
tl_assert(p->a1 == cond);
tl_assert(p->type == ClientCondvar);
- p->cleanup = (void(*)(DrdClientobj*))(DRD_(cond_cleanup));
- p->waiter_count = 0;
- p->mutex = 0;
+ p->cleanup = (void(*)(DrdClientobj*))(DRD_(cond_cleanup));
+ p->delete_thread = 0;
+ p->waiter_count = 0;
+ p->mutex = 0;
}
/**
@@ -328,7 +329,3 @@
DRD_(cond_signal)(cond);
}
-
-/** Called after pthread_cond_destroy(). */
-void DRD_(cond_thread_delete)(const DrdThreadId tid)
-{ }
Modified: branches/DARWIN/drd/drd_cond.h
===================================================================
--- branches/DARWIN/drd/drd_cond.h 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_cond.h 2009-02-23 03:30:27 UTC (rev 9232)
@@ -45,7 +45,6 @@
int DRD_(cond_post_wait)(const Addr cond);
void DRD_(cond_pre_signal)(const Addr cond);
void DRD_(cond_pre_broadcast)(const Addr cond);
-void DRD_(cond_thread_delete)(const DrdThreadId tid);
#endif /* __DRD_COND_H */
Modified: branches/DARWIN/drd/drd_error.c
===================================================================
--- branches/DARWIN/drd/drd_error.c 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_error.c 2009-02-23 03:30:27 UTC (rev 9232)
@@ -42,12 +42,12 @@
/* Local variables. */
-static Bool DRD_(s_show_conflicting_segments) = True;
+static Bool s_show_conflicting_segments = True;
void DRD_(set_show_conflicting_segments)(const Bool scs)
{
- DRD_(s_show_conflicting_segments) = scs;
+ s_show_conflicting_segments = scs;
}
/**
@@ -55,8 +55,7 @@
* messages, putting the result in ai.
*/
static
-void DRD_(describe_malloced_addr)(Addr const a, SizeT const len,
- AddrInfo* const ai)
+void describe_malloced_addr(Addr const a, SizeT const len, AddrInfo* const ai)
{
Addr data;
@@ -76,7 +75,7 @@
* call stack will either refer to a pthread_*_init() or a pthread_*lock()
* call.
*/
-static void DRD_(first_observed)(const Addr obj)
+static void first_observed(const Addr obj)
{
DrdClientobj* cl;
@@ -93,8 +92,7 @@
}
static
-void DRD_(drd_report_data_race)(Error* const err,
- const DataRaceErrInfo* const dri)
+void drd_report_data_race(Error* const err, const DataRaceErrInfo* const dri)
{
AddrInfo ai;
const unsigned descr_size = 256;
@@ -112,7 +110,7 @@
VG_(get_data_description)(descr1, descr2, descr_size, dri->addr);
if (descr1[0] == 0)
{
- DRD_(describe_malloced_addr)(dri->addr, dri->size, &ai);
+ describe_malloced_addr(dri->addr, dri->size, &ai);
}
VG_(message)(Vg_UserMsg,
"Conflicting %s by thread %d/%d at 0x%08lx size %ld",
@@ -153,7 +151,7 @@
VG_(message)(Vg_UserMsg, "Allocation context: unknown.");
}
}
- if (DRD_(s_show_conflicting_segments))
+ if (s_show_conflicting_segments)
{
DRD_(thread_report_conflicting_segments)(dri->tid,
dri->addr, dri->size,
@@ -164,17 +162,17 @@
VG_(free)(descr1);
}
-static Bool DRD_(drd_tool_error_eq)(VgRes res, Error* e1, Error* e2)
+static Bool drd_tool_error_eq(VgRes res, Error* e1, Error* e2)
{
return False;
}
-static void DRD_(drd_tool_error_pp)(Error* const e)
+static void drd_tool_error_pp(Error* const e)
{
switch (VG_(get_error_kind)(e))
{
case DataRaceErr: {
- DRD_(drd_report_data_race)(e, VG_(get_error_extra)(e));
+ drd_report_data_race(e, VG_(get_error_extra)(e));
break;
}
case MutexErr: {
@@ -196,7 +194,7 @@
p->mutex);
}
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- DRD_(first_observed)(p->mutex);
+ first_observed(p->mutex);
break;
}
case CondErr: {
@@ -206,7 +204,7 @@
VG_(get_error_string)(e),
cdei->cond);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- DRD_(first_observed)(cdei->cond);
+ first_observed(cdei->cond);
break;
}
case CondDestrErr: {
@@ -217,7 +215,7 @@
cdi->cond, cdi->mutex,
DRD_(DrdThreadIdToVgThreadId)(cdi->tid), cdi->tid);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- DRD_(first_observed)(cdi->mutex);
+ first_observed(cdi->mutex);
break;
}
case CondRaceErr: {
@@ -228,8 +226,8 @@
" by the signalling thread.",
cei->cond, cei->mutex);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- DRD_(first_observed)(cei->cond);
- DRD_(first_observed)(cei->mutex);
+ first_observed(cei->cond);
+ first_observed(cei->mutex);
break;
}
case CondWaitErr: {
@@ -241,9 +239,9 @@
cwei->mutex1,
cwei->mutex2);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- DRD_(first_observed)(cwei->cond);
- DRD_(first_observed)(cwei->mutex1);
- DRD_(first_observed)(cwei->mutex2);
+ first_observed(cwei->cond);
+ first_observed(cwei->mutex1);
+ first_observed(cwei->mutex2);
break;
}
case SemaphoreErr: {
@@ -254,18 +252,26 @@
VG_(get_error_string)(e),
sei->semaphore);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- DRD_(first_observed)(sei->semaphore);
+ first_observed(sei->semaphore);
break;
}
case BarrierErr: {
- BarrierErrInfo* bei =(BarrierErrInfo*)(VG_(get_error_extra)(e));
+ BarrierErrInfo* bei = (BarrierErrInfo*)(VG_(get_error_extra)(e));
tl_assert(bei);
VG_(message)(Vg_UserMsg,
"%s: barrier 0x%lx",
VG_(get_error_string)(e),
bei->barrier);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- DRD_(first_observed)(bei->barrier);
+ if (bei->other_context)
+ {
+ VG_(message)(Vg_UserMsg,
+ "Conflicting wait call by thread %d/%d:",
+ DRD_(DrdThreadIdToVgThreadId)(bei->other_tid),
+ bei->other_tid);
+ VG_(pp_ExeContext)(bei->other_context);
+ }
+ first_observed(bei->barrier);
break;
}
case RwlockErr: {
@@ -276,7 +282,7 @@
VG_(get_error_string)(e),
p->rwlock);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- DRD_(first_observed)(p->rwlock);
+ first_observed(p->rwlock);
break;
}
case HoldtimeErr: {
@@ -292,7 +298,7 @@
p->hold_time_ms,
p->threshold_ms);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
- DRD_(first_observed)(p->synchronization_object);
+ first_observed(p->synchronization_object);
break;
}
case GenericErr: {
@@ -310,7 +316,7 @@
}
}
-static UInt DRD_(drd_tool_error_update_extra)(Error* e)
+static UInt drd_tool_error_update_extra(Error* e)
{
switch (VG_(get_error_kind)(e))
{
@@ -342,7 +348,7 @@
}
}
-static Bool DRD_(drd_tool_error_recog)(Char* const name, Supp* const supp)
+static Bool drd_tool_error_recog(Char* const name, Supp* const supp)
{
SuppKind skind = 0;
@@ -376,12 +382,12 @@
}
static
-Bool DRD_(drd_tool_error_read_extra)(Int fd, Char* buf, Int nBuf, Supp* supp)
+Bool drd_tool_error_read_extra(Int fd, Char* buf, Int nBuf, Supp* supp)
{
return True;
}
-static Bool DRD_(drd_tool_error_matches)(Error* const e, Supp* const supp)
+static Bool drd_tool_error_matches(Error* const e, Supp* const supp)
{
switch (VG_(get_supp_kind)(supp))
{
@@ -389,7 +395,7 @@
return True;
}
-static Char* DRD_(drd_tool_error_name)(Error* e)
+static Char* drd_tool_error_name(Error* e)
{
switch (VG_(get_error_kind)(e))
{
@@ -410,19 +416,19 @@
return 0;
}
-static void DRD_(drd_tool_error_print_extra)(Error* e)
+static void drd_tool_error_print_extra(Error* e)
{ }
void DRD_(register_error_handlers)(void)
{
// Tool error reporting.
- VG_(needs_tool_errors)(DRD_(drd_tool_error_eq),
- DRD_(drd_tool_error_pp),
+ VG_(needs_tool_errors)(drd_tool_error_eq,
+ drd_tool_error_pp,
True,
- DRD_(drd_tool_error_update_extra),
- DRD_(drd_tool_error_recog),
- DRD_(drd_tool_error_read_extra),
- DRD_(drd_tool_error_matches),
- DRD_(drd_tool_error_name),
- DRD_(drd_tool_error_print_extra));
+ drd_tool_error_update_extra,
+ drd_tool_error_recog,
+ drd_tool_error_read_extra,
+ drd_tool_error_matches,
+ drd_tool_error_name,
+ drd_tool_error_print_extra);
}
Modified: branches/DARWIN/drd/drd_error.h
===================================================================
--- branches/DARWIN/drd/drd_error.h 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_error.h 2009-02-23 03:30:27 UTC (rev 9232)
@@ -128,7 +128,9 @@
} SemaphoreErrInfo;
typedef struct {
- Addr barrier;
+ Addr barrier;
+ DrdThreadId other_tid;
+ ExeContext* other_context;
} BarrierErrInfo;
typedef struct {
Modified: branches/DARWIN/drd/drd_mutex.c
===================================================================
--- branches/DARWIN/drd/drd_mutex.c 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_mutex.c 2009-02-23 03:30:27 UTC (rev 9232)
@@ -38,16 +38,17 @@
/* Local functions. */
-static void DRD_(mutex_cleanup)(struct mutex_info* p);
-static Bool DRD_(mutex_is_locked)(struct mutex_info* const p);
+static void mutex_cleanup(struct mutex_info* p);
+static Bool mutex_is_locked(struct mutex_info* const p);
+static void mutex_delete_thread(struct mutex_info* p, const DrdThreadId tid);
/* Local variables. */
-static Bool DRD_(s_trace_mutex);
-static ULong DRD_(s_mutex_lock_count);
-static ULong DRD_(s_mutex_segment_creation_count);
-static UInt DRD_(s_mutex_lock_threshold_ms) = 1000 * 1000;
+static Bool s_trace_mutex;
+static ULong s_mutex_lock_count;
+static ULong s_mutex_segment_creation_count;
+static UInt s_mutex_lock_threshold_ms = 1000 * 1000;
/* Function definitions. */
@@ -55,12 +56,12 @@
void DRD_(mutex_set_trace)(const Bool trace_mutex)
{
tl_assert(!! trace_mutex == trace_mutex);
- DRD_(s_trace_mutex) = trace_mutex;
+ s_trace_mutex = trace_mutex;
}
void DRD_(mutex_set_lock_threshold)(const UInt lock_threshold_ms)
{
- DRD_(s_mutex_lock_threshold_ms) = lock_threshold_ms;
+ s_mutex_lock_threshold_ms = lock_threshold_ms;
}
static
@@ -71,7 +72,9 @@
tl_assert(mutex_type != mutex_type_unknown);
tl_assert(p->a1 == mutex);
- p->cleanup = (void(*)(DrdClientobj*))&(DRD_(mutex_cleanup));
+ p->cleanup = (void(*)(DrdClientobj*))mutex_cleanup;
+ p->delete_thread
+ = (void(*)(DrdClientobj*, DrdThreadId))mutex_delete_thread;
p->mutex_type = mutex_type;
p->recursion_count = 0;
p->owner = DRD_INVALID_THREADID;
@@ -81,11 +84,11 @@
}
/** Deallocate the memory that was allocated by mutex_initialize(). */
-static void DRD_(mutex_cleanup)(struct mutex_info* p)
+static void mutex_cleanup(struct mutex_info* p)
{
tl_assert(p);
- if (DRD_(s_trace_mutex))
+ if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
"[%d/%d] mutex_destroy %s 0x%lx rc %d owner %d",
@@ -97,7 +100,7 @@
p ? p->owner : DRD_INVALID_THREADID);
}
- if (DRD_(mutex_is_locked)(p))
+ if (mutex_is_locked(p))
{
MutexErrInfo MEI = { p->a1, p->recursion_count, p->owner };
VG_(maybe_record_error)(VG_(get_running_tid)(),
@@ -162,7 +165,7 @@
tl_assert(mutex_type != mutex_type_unknown);
- if (DRD_(s_trace_mutex))
+ if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
"[%d/%d] mutex_init %s 0x%lx",
@@ -225,7 +228,7 @@
if (mutex_type == mutex_type_unknown)
mutex_type = p->mutex_type;
- if (DRD_(s_trace_mutex))
+ if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
"[%d/%d] %s %s 0x%lx rc %d owner %d",
@@ -279,7 +282,7 @@
p = DRD_(mutex_get)(mutex);
- if (DRD_(s_trace_mutex))
+ if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
"[%d/%d] %s %s 0x%lx rc %d owner %d%s",
@@ -306,12 +309,12 @@
DRD_(thread_combine_vc2)(drd_tid, &p->last_locked_segment->vc);
}
DRD_(thread_new_segment)(drd_tid);
- DRD_(s_mutex_segment_creation_count)++;
+ s_mutex_segment_creation_count++;
p->owner = drd_tid;
p->acquiry_time_ms = VG_(read_millisecond_timer)();
p->acquired_at = VG_(record_ExeContext)(VG_(get_running_tid)(), 0);
- DRD_(s_mutex_lock_count)++;
+ s_mutex_lock_count++;
}
else if (p->owner != drd_tid)
{
@@ -328,9 +331,8 @@
/**
* Update mutex_info state when unlocking the pthread_mutex_t mutex.
*
- * @param mutex Pointer to pthread_mutex_t data structure in the client space.
- * @param tid ThreadId of the thread calling pthread_mutex_unlock().
- * @param vc Pointer to the current vector clock of thread tid.
+ * @param[in] mutex Address of the client mutex.
+ * @param[in] mutex_type Mutex type.
*
* @return New value of the mutex recursion count.
*
@@ -347,7 +349,7 @@
if (mutex_type == mutex_type_unknown)
mutex_type = p->mutex_type;
- if (DRD_(s_trace_mutex))
+ if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
"[%d/%d] mutex_unlock %s 0x%lx rc %d",
@@ -400,13 +402,13 @@
if (p->recursion_count == 0)
{
- if (DRD_(s_mutex_lock_threshold_ms) > 0)
+ if (s_mutex_lock_threshold_ms > 0)
{
ULong held = VG_(read_millisecond_timer)() - p->acquiry_time_ms;
- if (held > DRD_(s_mutex_lock_threshold_ms))
+ if (held > s_mutex_lock_threshold_ms)
{
HoldtimeErrInfo HEI
- = { mutex, p->acquired_at, held, DRD_(s_mutex_lock_threshold_ms) };
+ = { mutex, p->acquired_at, held, s_mutex_lock_threshold_ms };
VG_(maybe_record_error)(vg_tid,
HoldtimeErr,
VG_(get_IP)(vg_tid),
@@ -422,7 +424,7 @@
DRD_(thread_get_latest_segment)(&p->last_locked_segment, drd_tid);
DRD_(thread_new_segment)(drd_tid);
p->acquired_at = 0;
- DRD_(s_mutex_segment_creation_count)++;
+ s_mutex_segment_creation_count++;
}
}
@@ -467,7 +469,7 @@
}
/** Return true if the specified mutex is locked by any thread. */
-static Bool DRD_(mutex_is_locked)(struct mutex_info* const p)
+static Bool mutex_is_locked(struct mutex_info* const p)
{
tl_assert(p);
return (p->recursion_count > 0);
@@ -494,33 +496,29 @@
* Call this function when thread tid stops to exist, such that the
* "last owner" field can be cleared if it still refers to that thread.
*/
-void DRD_(mutex_thread_delete)(const DrdThreadId tid)
+static void mutex_delete_thread(struct mutex_info* p, const DrdThreadId tid)
{
- struct mutex_info* p;
+ tl_assert(p);
- DRD_(clientobj_resetiter)();
- for ( ; (p = &(DRD_(clientobj_next)(ClientMutex)->mutex)) != 0; )
+ if (p->owner == tid && p->recursion_count > 0)
{
- if (p->owner == tid && p->recursion_count > 0)
- {
- MutexErrInfo MEI
- = { p->a1, p->recursion_count, p->owner };
- VG_(maybe_record_error)(VG_(get_running_tid)(),
- MutexErr,
- VG_(get_IP)(VG_(get_running_tid)()),
- "Mutex still locked at thread exit",
- &MEI);
- p->owner = VG_INVALID_THREADID;
- }
+ MutexErrInfo MEI
+ = { p->a1, p->recursion_count, p->owner };
+ VG_(maybe_record_error)(VG_(get_running_tid)(),
+ MutexErr,
+ VG_(get_IP)(VG_(get_running_tid)()),
+ "Mutex still locked at thread exit",
+ &MEI);
+ p->owner = VG_INVALID_THREADID;
}
}
ULong DRD_(get_mutex_lock_count)(void)
{
- return DRD_(s_mutex_lock_count);
+ return s_mutex_lock_count;
}
ULong DRD_(get_mutex_segment_creation_count)(void)
{
- return DRD_(s_mutex_segment_creation_count);
+ return s_mutex_segment_creation_count;
}
Modified: branches/DARWIN/drd/drd_mutex.h
===================================================================
--- branches/DARWIN/drd/drd_mutex.h 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_mutex.h 2009-02-23 03:30:27 UTC (rev 9232)
@@ -50,7 +50,6 @@
const char* DRD_(mutex_type_name)(const MutexT mt);
Bool DRD_(mutex_is_locked_by)(const Addr mutex, const DrdThreadId tid);
int DRD_(mutex_get_recursion_count)(const Addr mutex);
-void DRD_(mutex_thread_delete)(const DrdThreadId tid);
ULong DRD_(get_mutex_lock_count)(void);
ULong DRD_(get_mutex_segment_creation_count)(void);
Modified: branches/DARWIN/drd/drd_pthread_intercepts.c
===================================================================
--- branches/DARWIN/drd/drd_pthread_intercepts.c 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_pthread_intercepts.c 2009-02-23 03:30:27 UTC (rev 9232)
@@ -194,8 +194,10 @@
}
/**
- * Return 1 if the LinuxThread implementation has been detected, and 0
- * otherwise. For more information about the confstr() function, see also
+ * Return 1 if the LinuxThreads implementation of POSIX Threads has been
+ * detected, and 0 otherwise.
+ *
+ * @see For more information about the confstr() function, see also
* http://www.opengroup.org/onlinepubs/009695399/functions/confstr.html
*/
static int DRD_(detected_linuxthreads)(void)
@@ -283,7 +285,7 @@
/*
* Find out whether the thread will be started as a joinable thread
* or as a detached thread. If no thread attributes have been specified,
- * the new thread will be started as a joinable thread.
+ * this means that the new thread will be started as a joinable thread.
*/
thread_args.detachstate = PTHREAD_CREATE_JOINABLE;
if (attr)
@@ -710,7 +712,7 @@
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_BARRIER_WAIT,
barrier, pthread_barrier,
ret == 0 || ret == PTHREAD_BARRIER_SERIAL_THREAD,
- 0, 0);
+ ret == PTHREAD_BARRIER_SERIAL_THREAD, 0);
return ret;
}
#endif // HAVE_PTHREAD_BARRIER_INIT
Modified: branches/DARWIN/drd/drd_rwlock.c
===================================================================
--- branches/DARWIN/drd/drd_rwlock.c 2009-02-23 02:09:34 UTC (rev 9231)
+++ branches/DARWIN/drd/drd_rwlock.c 2009-02-23 03:30:27 UTC (rev 9232)
@@ -49,7 +49,9 @@
/* Local functions. */
-static void DRD_(rwlock_cleanup)(struct rwlock_info* p);
+static void rwlock_cleanup(struct rwlock_info* p);
+static void rwlock_delete_thread(struct rwlock_info* const p,
+ const DrdThreadId tid);
/* Local variables. */
@@ -184,7 +186,8 @@
tl_assert(p->a1 == rwlock);
tl_assert(p->type == ClientRwlock);
- p->cleanup = (void(*)(DrdClientobj*))&(DRD_(rwlock_cleanup));
+ p->cleanup = (void(*)(DrdClientobj*))rwlock_cleanup;
+ p->delete_thread = (void(*)(DrdClientobj*, DrdThreadId))rwlock_delete_thread;
p->thread_info = VG_(OSetGen_Create)(
0, 0, VG_(malloc), "drd.rwlock.ri.1", VG_(free));
p->acquiry_time_ms = 0;
@@ -192,7 +195,7 @@
}
/** Deallocate the memory that was allocated by rwlock_initialize(). */
-static void DRD_(rwlock_cleanup)(struct rwlock_info* p)
+static void rwlock_cleanup(struct rwlock_info* p)
{
struct rwlock_thread_info* q;
@@ -464,12 +467,13 @@
/**
* Update rwlock_info state when unlocking the pthread_rwlock_t rwlock.
- * Note: this function must be called before pthread_rwlock_unlock() is called,
- * or a race condition is triggered !
- * @return New value of the rwlock recursion count.
+ *
* @param rwlock Pointer to pthread_rwlock_t data structure in the client space.
- * @param tid ThreadId of the thread calling pthread_rwlock_unlock().
- * @param vc Pointer to the current vector clock of thread tid.
+ *
+ * @return New value of the rwlock recursion count.
+ *
+ * @note This function must be called before pthread_rwlock_unlock() is called,
+ * or a race condition is triggered !
*/
void DRD_(rwlock_pre_unlock)(const Addr rwlock)
{
@@ -567,26 +571,21 @@
* Call this function when thread tid stops to exist, such that the
* "last owner" field can be cleared if it still refers to that thread.
*/
-void DRD_(rwlock_thread_delete)(const DrdThreadId tid)
+static void rwlock_delete_thread(struct rwlock_info* const p,
+ const DrdThreadId tid)
{
- struct rwlock_info* p;
-
- DRD_(clientobj_resetiter)();
- for ( ; (p = &(DRD_(clientobj_next)(ClientRwlock)->rwlock)) != 0; )
+ struct rwlock_thread_info* q;
+ if (DRD_(rwlock_is_locked_by)(p, tid))
{
- struct rwlock_thread_info* q;
- if (DRD_(rwlock_is_locked_by)(p, tid))
- {
- RwlockErrInfo REI = { p->a1 };
- VG_(maybe_record_error)(VG_(get_running_tid)(),
- RwlockErr,
- VG_(get_IP)(VG_(get_running_tid)()),
- "Reader-writer lock still locked at thread exit",
- &REI);
- q = DRD_(lookup_or_insert_node)(p->thread_info, tid);
- q->reader_nesting_count = 0;
- q->writer_nesting_count = 0;
- }
+ RwlockErrInfo REI = { p->a1 };
+ VG_(maybe_record_error)(VG_(...
[truncated message content] |
|
From: Tom H. <th...@cy...> - 2009-02-23 03:27:26
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-02-23 03:05:10 GMT
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
== 480 tests, 5 stderr failures, 0 stdout failures, 0 post failures ==
exp-ptrcheck/tests/ccc (stderr)
exp-ptrcheck/tests/preen_invars (stderr)
exp-ptrcheck/tests/pth_create (stderr)
exp-ptrcheck/tests/pth_specific (stderr)
helgrind/tests/tc20_verifywrap (stderr)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... failed
Last 20 lines of verbose log follow echo
rm -f priv/main/vex_svnversion.h
cat quote.txt >> priv/main/vex_svnversion.h
svnversion -n . >> priv/main/vex_svnversion.h
cat quote.txt >> priv/main/vex_svnversion.h
cat newline.txt >> priv/main/vex_svnversion.h
make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
make -C ../VEX CC="gcc" AR="/usr/bin/ar" \
libvex_x86_linux.a \
EXTRA_CFLAGS=" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wdeclaration-after-statement \
-fno-stack-protector"
make[4]: Entering directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
make[4]: *** No rule to make target `libvex_x86_linux.a'. Stop.
make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
make[3]: *** [../VEX/libvex_x86_linux.a] Error 2
make[3]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Mon Feb 23 03:07:42 2009
--- new.short Mon Feb 23 03:27:19 2009
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- rm -f priv/main/vex_svnversion.h
- cat quote.txt >> priv/main/vex_svnversion.h
- svnversion -n . >> priv/main/vex_svnversion.h
- cat quote.txt >> priv/main/vex_svnversion.h
- cat newline.txt >> priv/main/vex_svnversion.h
- make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
- make -C ../VEX CC="gcc" AR="/usr/bin/ar" \
- libvex_x86_linux.a \
- EXTRA_CFLAGS=" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wdeclaration-after-statement \
- -fno-stack-protector"
- make[4]: Entering directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
- make[4]: *** No rule to make target `libvex_x86_linux.a'. Stop.
- make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
- make[3]: *** [../VEX/libvex_x86_linux.a] Error 2
- make[3]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
- make[2]: *** [all-recursive] Error 1
- make[2]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind'
- make: *** [all] Error 2
--- 3,15 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 480 tests, 5 stderr failures, 0 stdout failures, 0 post failures ==
! exp-ptrcheck/tests/ccc (stderr)
! exp-ptrcheck/tests/preen_invars (stderr)
! exp-ptrcheck/tests/pth_create (stderr)
! exp-ptrcheck/tests/pth_specific (stderr)
! helgrind/tests/tc20_verifywrap (stderr)
|
|
From: Tom H. <th...@cy...> - 2009-02-23 03:23:03
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-02-23 03:10:04 GMT
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
== 486 tests, 4 stderr failures, 2 stdout failures, 0 post failures ==
exp-ptrcheck/tests/ccc (stderr)
exp-ptrcheck/tests/preen_invars (stderr)
exp-ptrcheck/tests/pth_create (stderr)
exp-ptrcheck/tests/pth_specific (stderr)
memcheck/tests/linux/timerfd-syscall (stdout)
none/tests/linux/mremap2 (stdout)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... failed
Last 20 lines of verbose log follow echo
rm -f priv/main/vex_svnversion.h
cat quote.txt >> priv/main/vex_svnversion.h
svnversion -n . >> priv/main/vex_svnversion.h
cat quote.txt >> priv/main/vex_svnversion.h
cat newline.txt >> priv/main/vex_svnversion.h
make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
make -C ../VEX CC="gcc" AR="/usr/bin/ar" \
libvex_x86_linux.a \
EXTRA_CFLAGS=" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wdeclaration-after-statement \
-fno-stack-protector"
make[4]: Entering directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
make[4]: *** No rule to make target `libvex_x86_linux.a'. Stop.
make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
make[3]: *** [../VEX/libvex_x86_linux.a] Error 2
make[3]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Mon Feb 23 03:11:45 2009
--- new.short Mon Feb 23 03:22:54 2009
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- rm -f priv/main/vex_svnversion.h
- cat quote.txt >> priv/main/vex_svnversion.h
- svnversion -n . >> priv/main/vex_svnversion.h
- cat quote.txt >> priv/main/vex_svnversion.h
- cat newline.txt >> priv/main/vex_svnversion.h
- make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
- make -C ../VEX CC="gcc" AR="/usr/bin/ar" \
- libvex_x86_linux.a \
- EXTRA_CFLAGS=" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wdeclaration-after-statement \
- -fno-stack-protector"
- make[4]: Entering directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
- make[4]: *** No rule to make target `libvex_x86_linux.a'. Stop.
- make[4]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/VEX'
- make[3]: *** [../VEX/libvex_x86_linux.a] Error 2
- make[3]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
- make[2]: *** [all-recursive] Error 1
- make[2]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind/memcheck'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/vgtest/2009-02-23/valgrind'
- make: *** [all] Error 2
--- 3,16 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 486 tests, 4 stderr failures, 2 stdout failures, 0 post failures ==
! exp-ptrcheck/tests/ccc (stderr)
! exp-ptrcheck/tests/preen_invars (stderr)
! exp-ptrcheck/tests/pth_create (stderr)
! exp-ptrcheck/tests/pth_specific (stderr)
! memcheck/tests/linux/timerfd-syscall (stdout)
! none/tests/linux/mremap2 (stdout)
|
|
From: <sv...@va...> - 2009-02-23 02:10:39
|
Author: njn Date: 2009-02-23 01:33:40 +0000 (Mon, 23 Feb 2009) New Revision: 9228 Log: A few more test/build changes. Modified: trunk/drd/tests/Makefile.am trunk/memcheck/tests/amd64/Makefile.am trunk/memcheck/tests/linux/Makefile.am trunk/memcheck/tests/x86-linux/Makefile.am trunk/memcheck/tests/x86/Makefile.am trunk/none/tests/linux/Makefile.am Modified: trunk/drd/tests/Makefile.am =================================================================== --- trunk/drd/tests/Makefile.am 2009-02-23 01:18:06 UTC (rev 9227) +++ trunk/drd/tests/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228) @@ -205,8 +205,6 @@ memory_allocation \ monitor_example \ new_delete \ - rwlock_race \ - rwlock_test \ pth_broadcast \ pth_cancel_locked \ pth_cond_race \ @@ -215,6 +213,8 @@ pth_detached_sem \ pth_inconsistent_cond_wait \ recursive_mutex \ + rwlock_race \ + rwlock_test \ sem_as_mutex \ sigalrm \ trylock Modified: trunk/memcheck/tests/amd64/Makefile.am =================================================================== --- trunk/memcheck/tests/amd64/Makefile.am 2009-02-23 01:18:06 UTC (rev 9227) +++ trunk/memcheck/tests/amd64/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228) @@ -26,6 +26,7 @@ int3-amd64 \ more_x87_fp sse_memory xor-undef-amd64 + AM_CFLAGS += @FLAG_M64@ AM_CXXFLAGS += @FLAG_M64@ AM_CCASFLAGS = @FLAG_M64@ Modified: trunk/memcheck/tests/linux/Makefile.am =================================================================== --- trunk/memcheck/tests/linux/Makefile.am 2009-02-23 01:18:06 UTC (rev 9227) +++ trunk/memcheck/tests/linux/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228) @@ -15,5 +15,9 @@ stack_switch \ timerfd-syscall + +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + stack_switch_LDADD = -lpthread timerfd_syscall_LDADD = -lrt Modified: trunk/memcheck/tests/x86/Makefile.am =================================================================== --- trunk/memcheck/tests/x86/Makefile.am 2009-02-23 01:18:06 UTC (rev 9227) +++ trunk/memcheck/tests/x86/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228) @@ -37,9 +37,9 @@ pushpopmem sse_memory tronical \ more_x86_fp fprem xor-undef-x86 -AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) -AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) -AM_CCASFLAGS = @FLAG_M32@ +AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) +AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) +AM_CCASFLAGS = @FLAG_M32@ # must be built with these flags -- bug only occurred with them fpeflags_CFLAGS = $(AM_CFLAGS) -march=i686 Modified: trunk/memcheck/tests/x86-linux/Makefile.am =================================================================== --- trunk/memcheck/tests/x86-linux/Makefile.am 2009-02-23 01:18:06 UTC (rev 9227) +++ trunk/memcheck/tests/x86-linux/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228) @@ -17,6 +17,7 @@ check_PROGRAMS = \ scalar scalar_exit_group scalar_fork scalar_supp scalar_vfork + AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) AM_CCASFLAGS = @FLAG_M32@ Modified: trunk/none/tests/linux/Makefile.am =================================================================== --- trunk/none/tests/linux/Makefile.am 2009-02-23 01:18:06 UTC (rev 9227) +++ trunk/none/tests/linux/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228) @@ -12,3 +12,7 @@ mremap \ mremap2 + +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + |
|
From: <sv...@va...> - 2009-02-23 02:09:39
|
Author: njn
Date: 2009-02-23 02:09:34 +0000 (Mon, 23 Feb 2009)
New Revision: 9231
Log:
Merge r9230 (add missing __extension__ markings to valgrind.h) from trunk.
Modified:
branches/DARWIN/include/valgrind.h
Modified: branches/DARWIN/include/valgrind.h
===================================================================
--- branches/DARWIN/include/valgrind.h 2009-02-23 02:08:24 UTC (rev 9230)
+++ branches/DARWIN/include/valgrind.h 2009-02-23 02:09:34 UTC (rev 9231)
@@ -3896,6 +3896,7 @@
/* Return 1 if a mempool exists, else 0. */
#define VALGRIND_MEMPOOL_EXISTS(pool) \
+ __extension__ \
({unsigned int _qzz_res; \
VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
VG_USERREQ__MEMPOOL_EXISTS, \
@@ -3905,6 +3906,7 @@
/* Mark a piece of memory as being a stack. Returns a stack id. */
#define VALGRIND_STACK_REGISTER(start, end) \
+ __extension__ \
({unsigned int _qzz_res; \
VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
VG_USERREQ__STACK_REGISTER, \
|
|
From: <sv...@va...> - 2009-02-23 02:08:32
|
Author: njn
Date: 2009-02-23 02:08:24 +0000 (Mon, 23 Feb 2009)
New Revision: 9230
Log:
Add missing __extension__ markings on a couple of clreqs.
Modified:
trunk/include/valgrind.h
Modified: trunk/include/valgrind.h
===================================================================
--- trunk/include/valgrind.h 2009-02-23 01:57:26 UTC (rev 9229)
+++ trunk/include/valgrind.h 2009-02-23 02:08:24 UTC (rev 9230)
@@ -3880,6 +3880,7 @@
/* Return 1 if a mempool exists, else 0. */
#define VALGRIND_MEMPOOL_EXISTS(pool) \
+ __extension__ \
({unsigned int _qzz_res; \
VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
VG_USERREQ__MEMPOOL_EXISTS, \
@@ -3889,6 +3890,7 @@
/* Mark a piece of memory as being a stack. Returns a stack id. */
#define VALGRIND_STACK_REGISTER(start, end) \
+ __extension__ \
({unsigned int _qzz_res; \
VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
VG_USERREQ__STACK_REGISTER, \
|
Author: njn
Date: 2009-02-23 01:57:26 +0000 (Mon, 23 Feb 2009)
New Revision: 9229
Log:
Merge r9202, 9206, 9222, 9225--9228 (various build system fixes for tests)
from the trunk.
Added:
branches/DARWIN/drd/tests/pth_barrier.c
branches/DARWIN/drd/tests/rwlock_race.c
branches/DARWIN/drd/tests/rwlock_test.c
branches/DARWIN/helgrind/tests/pth_barrier.c
branches/DARWIN/helgrind/tests/rwlock_race.c
branches/DARWIN/helgrind/tests/rwlock_test.c
Removed:
branches/DARWIN/drd/tests/pth_barrier.c
branches/DARWIN/drd/tests/rwlock_race.c
branches/DARWIN/drd/tests/rwlock_test.c
branches/DARWIN/memcheck/tests/hello.c
Modified:
branches/DARWIN/Makefile.tool-tests.am
branches/DARWIN/cachegrind/tests/Makefile.am
branches/DARWIN/cachegrind/tests/x86/Makefile.am
branches/DARWIN/callgrind/tests/Makefile.am
branches/DARWIN/drd/tests/Makefile.am
branches/DARWIN/drd/tests/bar_bad.vgtest
branches/DARWIN/drd/tests/bar_trivial.vgtest
branches/DARWIN/drd/tests/hg01_all_ok.vgtest
branches/DARWIN/drd/tests/hg02_deadlock.vgtest
branches/DARWIN/drd/tests/hg03_inherit.vgtest
branches/DARWIN/drd/tests/hg04_race.vgtest
branches/DARWIN/drd/tests/hg05_race2.vgtest
branches/DARWIN/drd/tests/hg06_readshared.vgtest
branches/DARWIN/drd/tests/rwlock_test.stderr.exp
branches/DARWIN/drd/tests/rwlock_test.vgtest
branches/DARWIN/drd/tests/tc01_simple_race.vgtest
branches/DARWIN/drd/tests/tc02_simple_tls.vgtest
branches/DARWIN/drd/tests/tc03_re_excl.vgtest
branches/DARWIN/drd/tests/tc04_free_lock.vgtest
branches/DARWIN/drd/tests/tc05_simple_race.vgtest
branches/DARWIN/drd/tests/tc06_two_races.vgtest
branches/DARWIN/drd/tests/tc07_hbl1.vgtest
branches/DARWIN/drd/tests/tc08_hbl2.vgtest
branches/DARWIN/drd/tests/tc09_bad_unlock.vgtest
branches/DARWIN/drd/tests/tc10_rec_lock.vgtest
branches/DARWIN/drd/tests/tc11_XCHG.vgtest
branches/DARWIN/drd/tests/tc12_rwl_trivial.vgtest
branches/DARWIN/drd/tests/tc13_laog1.vgtest
branches/DARWIN/drd/tests/tc15_laog_lockdel.vgtest
branches/DARWIN/drd/tests/tc16_byterace.vgtest
branches/DARWIN/drd/tests/tc17_sembar.vgtest
branches/DARWIN/drd/tests/tc18_semabuse.vgtest
branches/DARWIN/drd/tests/tc19_shadowmem.vgtest
branches/DARWIN/drd/tests/tc20_verifywrap.vgtest
branches/DARWIN/drd/tests/tc20_verifywrap2.vgtest
branches/DARWIN/drd/tests/tc21_pthonce.vgtest
branches/DARWIN/drd/tests/tc22_exit_w_lock.vgtest
branches/DARWIN/drd/tests/tc23_bogus_condwait.vgtest
branches/DARWIN/drd/tests/tc24_nonzero_sem.vgtest
branches/DARWIN/exp-ptrcheck/tests/Makefile.am
branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am
branches/DARWIN/helgrind/tests/Makefile.am
branches/DARWIN/helgrind/tests/pth_barrier1.vgtest
branches/DARWIN/helgrind/tests/pth_barrier2.vgtest
branches/DARWIN/helgrind/tests/pth_barrier3.vgtest
branches/DARWIN/helgrind/tests/rwlock_race.vgtest
branches/DARWIN/helgrind/tests/rwlock_test.vgtest
branches/DARWIN/massif/tests/Makefile.am
branches/DARWIN/memcheck/tests/Makefile.am
branches/DARWIN/memcheck/tests/amd64/Makefile.am
branches/DARWIN/memcheck/tests/linux/Makefile.am
branches/DARWIN/memcheck/tests/linux/timerfd-syscall.c
branches/DARWIN/memcheck/tests/x86-linux/Makefile.am
branches/DARWIN/memcheck/tests/x86/Makefile.am
branches/DARWIN/none/tests/Makefile.am
branches/DARWIN/none/tests/amd64/Makefile.am
branches/DARWIN/none/tests/linux/Makefile.am
branches/DARWIN/none/tests/ppc32/Makefile.am
branches/DARWIN/none/tests/ppc64/Makefile.am
branches/DARWIN/none/tests/x86/Makefile.am
branches/DARWIN/perf/Makefile.am
branches/DARWIN/tests/Makefile.am
Modified: branches/DARWIN/Makefile.tool-tests.am
===================================================================
--- branches/DARWIN/Makefile.tool-tests.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/Makefile.tool-tests.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,18 @@
+
+include $(top_srcdir)/Makefile.flags.am # For AM_FLAG_M3264_PRI
+
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
+ -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
+ -I@VEX_DIR@/pub \
+ -DVGA_$(VGCONF_ARCH_PRI)=1 \
+ -DVGO_$(VGCONF_OS)=1 \
+ -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
+# Nb: Tools need to augment these flags with an arch-selection option, such
+# as $(AM_FLAG_M3264_PRI).
+AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g
+AM_CXXFLAGS = $(WERROR) -Winline -Wall -Wshadow -g
+
+
# On Darwin, for a program 'p', the DWARF debug info is stored in the
# directory 'p.dSYM'. This must be generated after the executable is
# created, with 'dsymutil p'. We could redefine LINK with a script that
Modified: branches/DARWIN/cachegrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/cachegrind/tests/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/cachegrind/tests/Makefile.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,8 +1,4 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
-
-# For check-local and clean-local
include $(top_srcdir)/Makefile.tool-tests.am
SUBDIRS = .
@@ -24,15 +20,14 @@
check_PROGRAMS = \
chdir clreq dlclose myprint.so
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
+AM_CFLAGS += $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
# C ones
dlclose_LDADD = -ldl
-myprint_so_SOURCES = myprint.c
if VGCONF_OS_IS_DARWIN
-myprint_so_LDFLAGS = $(AM_FLAG_M3264_PRI) -dynamic -dynamiclib -all_load -fpic
+myprint_so_LDFLAGS = $(AM_CFLAGS) -dynamic -dynamiclib -all_load -fpic
else
-myprint_so_LDFLAGS = $(AM_FLAG_M3264_PRI) -shared -fPIC
+myprint_so_LDFLAGS = $(AM_CFLAGS) -shared -fPIC
endif
-myprint_so_CFLAGS = $(AM_FLAG_M3264_PRI) -fPIC
+myprint_so_CFLAGS = $(AM_CFLAGS) -fPIC
Modified: branches/DARWIN/cachegrind/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/cachegrind/tests/x86/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/cachegrind/tests/x86/Makefile.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,4 +1,4 @@
-# For check-local and clean-local
+
include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr
@@ -9,7 +9,9 @@
check_PROGRAMS = \
fpu-28-108
-AM_CFLAGS = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g
+
+AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
AM_CCASFLAGS = @FLAG_M32@
fpu_28_108_SOURCES = fpu-28-108.S
Modified: branches/DARWIN/callgrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/callgrind/tests/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/callgrind/tests/Makefile.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,7 +1,4 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
-# For check-local and clean-local
include $(top_srcdir)/Makefile.tool-tests.am
SUBDIRS = .
@@ -22,7 +19,7 @@
check_PROGRAMS = clreq simwork threads
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
+AM_CFLAGS += $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
threads_LDADD = -lpthread
Modified: branches/DARWIN/drd/tests/Makefile.am
===================================================================
--- branches/DARWIN/drd/tests/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/Makefile.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,7 +1,4 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
-# For check-local and clean-local
include $(top_srcdir)/Makefile.tool-tests.am
SUBDIRS = .
@@ -195,24 +192,11 @@
trylock.stderr.exp \
trylock.vgtest
-AM_CFLAGS = $(WERROR) -Wall @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter\
- -g $(AM_FLAG_M3264_PRI) -DVGA_$(VGCONF_ARCH_PRI)=1 \
- -DVGO_$(VGCONF_OS)=1 -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
- -I$(top_builddir)/include -I$(top_srcdir)/VEX/pub
-AM_CXXFLAGS = $(AM_CFLAGS)
-
check_PROGRAMS = \
atomic_var \
circular_buffer \
drd_bitmap_test \
fp_race \
- hg01_all_ok \
- hg02_deadlock \
- hg03_inherit \
- hg04_race \
- hg05_race2 \
- hg06_readshared \
hold_lock \
linuxthreads_det \
memory_allocation \
@@ -230,28 +214,6 @@
rwlock_test \
sem_as_mutex \
sigalrm \
- 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 \
- tc11_XCHG \
- tc12_rwl_trivial \
- tc13_laog1 \
- tc15_laog_lockdel \
- tc16_byterace \
- tc17_sembar \
- tc18_semabuse \
- tc19_shadowmem \
- tc21_pthonce \
- tc22_exit_w_lock \
- tc23_bogus_condwait \
- tc24_nonzero_sem \
trylock
if HAVE_BOOST_1_35
@@ -263,13 +225,9 @@
endif
if HAVE_PTHREAD_BARRIER
-check_PROGRAMS += bar_bad bar_trivial matinv pth_barrier pth_barrier_reinit
+check_PROGRAMS += matinv pth_barrier pth_barrier_reinit
endif
-if HAVE_PTHREAD_MUTEX_TIMEDLOCK
-check_PROGRAMS += tc20_verifywrap
-endif
-
if HAVE_PTHREAD_SPINLOCK
check_PROGRAMS += pth_spinlock
endif
@@ -279,156 +237,20 @@
endif
-atomic_var_SOURCES = atomic_var.c
-atomic_var_LDADD = -lpthread
+AM_CFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
+AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
-circular_buffer_SOURCES = circular_buffer.c
-circular_buffer_LDADD = -lpthread
+LDADD = -lpthread
-drd_bitmap_test_SOURCES = drd_bitmap_test.c
+
drd_bitmap_test_CFLAGS = $(AM_CFLAGS) -O2 \
-DENABLE_DRD_CONSISTENCY_CHECKS\
@FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
+drd_bitmap_test_LDADD = # nothing, ie. not -lpthread
-fp_race_SOURCES = fp_race.c
-fp_race_LDADD = -lpthread
-
-hg01_all_ok_SOURCES = ../../helgrind/tests/hg01_all_ok.c
-hg01_all_ok_LDADD = -lpthread
-
-hg02_deadlock_SOURCES = ../../helgrind/tests/hg02_deadlock.c
-hg02_deadlock_LDADD = -lpthread
-
-hg03_inherit_SOURCES = ../../helgrind/tests/hg03_inherit.c
-hg03_inherit_LDADD = -lpthread
-
-hg04_race_SOURCES = ../../helgrind/tests/hg04_race.c
-hg04_race_LDADD = -lpthread
-
-hg05_race2_SOURCES = ../../helgrind/tests/hg05_race2.c
-hg05_race2_LDADD = -lpthread
-
-hg06_readshared_SOURCES = ../../helgrind/tests/hg06_readshared.c
-hg06_readshared_LDADD = -lpthread
-
-hold_lock_SOURCES = hold_lock.c
-hold_lock_LDADD = -lpthread
-
-linuxthreads_det_SOURCES = linuxthreads_det.c
-linuxthreads_det_LDADD = -lpthread
-
-memory_allocation_SOURCES = memory_allocation.c
-
monitor_example_SOURCES = monitor_example.cpp
-monitor_example_LDADD = -lpthread
-
new_delete_SOURCES = new_delete.cpp
-pth_broadcast_SOURCES = pth_broadcast.c
-pth_broadcast_LDADD = -lpthread
-
-pth_cancel_locked_SOURCES = pth_cancel_locked.c
-pth_cancel_locked_LDADD = -lpthread
-
-pth_cond_race_SOURCES = pth_cond_race.c
-pth_cond_race_LDADD = -lpthread
-
-pth_create_chain_SOURCES = pth_create_chain.c
-pth_create_chain_LDADD = -lpthread
-
-pth_detached_SOURCES = pth_detached.c
-pth_detached_LDADD = -lpthread
-
-pth_detached_sem_SOURCES = pth_detached_sem.c
-pth_detached_sem_LDADD = -lpthread
-
-pth_inconsistent_cond_wait_SOURCES = pth_inconsistent_cond_wait.c
-pth_inconsistent_cond_wait_LDADD = -lpthread
-
-recursive_mutex_SOURCES = recursive_mutex.c
-recursive_mutex_LDADD = -lpthread
-
-rwlock_race_SOURCES = rwlock_race.c
-rwlock_race_LDADD = -lpthread
-
-rwlock_test_SOURCES = rwlock_test.c
-rwlock_test_LDADD = -lpthread
-
-sem_as_mutex_SOURCES = sem_as_mutex.c
-sem_as_mutex_LDADD = -lpthread
-
-sigalrm_SOURCES = sigalrm.c
-sigalrm_LDADD = -lpthread
-
-tc01_simple_race_SOURCES = ../../helgrind/tests/tc01_simple_race.c
-tc01_simple_race_LDADD = -lpthread
-
-tc02_simple_tls_SOURCES = ../../helgrind/tests/tc02_simple_tls.c
-tc02_simple_tls_LDADD = -lpthread
-
-tc03_re_excl_SOURCES = ../../helgrind/tests/tc03_re_excl.c
-tc03_re_excl_LDADD = -lpthread
-
-tc04_free_lock_SOURCES = ../../helgrind/tests/tc04_free_lock.c
-tc04_free_lock_LDADD = -lpthread
-
-tc05_simple_race_SOURCES = ../../helgrind/tests/tc05_simple_race.c
-tc05_simple_race_LDADD = -lpthread
-
-tc06_two_races_SOURCES = ../../helgrind/tests/tc06_two_races.c
-tc06_two_races_LDADD = -lpthread
-
-tc07_hbl1_SOURCES = ../../helgrind/tests/tc07_hbl1.c
-tc07_hbl1_LDADD = -lpthread
-
-tc08_hbl2_SOURCES = ../../helgrind/tests/tc08_hbl2.c
-tc08_hbl2_LDADD = -lpthread
-
-tc09_bad_unlock_SOURCES = ../../helgrind/tests/tc09_bad_unlock.c
-tc09_bad_unlock_LDADD = -lpthread
-
-tc10_rec_lock_SOURCES = ../../helgrind/tests/tc10_rec_lock.c
-tc10_rec_lock_LDADD = -lpthread
-
-tc11_XCHG_SOURCES = ../../helgrind/tests/tc11_XCHG.c
-tc11_XCHG_LDADD = -lpthread
-
-tc12_rwl_trivial_SOURCES = ../../helgrind/tests/tc12_rwl_trivial.c
-tc12_rwl_trivial_LDADD = -lpthread
-
-tc13_laog1_SOURCES = ../../helgrind/tests/tc13_laog1.c
-tc13_laog1_LDADD = -lpthread
-
-tc15_laog_lockdel_SOURCES = ../../helgrind/tests/tc15_laog_lockdel.c
-tc15_laog_lockdel_LDADD = -lpthread
-
-tc16_byterace_SOURCES = ../../helgrind/tests/tc16_byterace.c
-tc16_byterace_LDADD = -lpthread
-
-tc17_sembar_SOURCES = ../../helgrind/tests/tc17_sembar.c
-tc17_sembar_LDADD = -lpthread
-
-tc18_semabuse_SOURCES = ../../helgrind/tests/tc18_semabuse.c
-tc18_semabuse_LDADD = -lpthread
-
-tc19_shadowmem_SOURCES = ../../helgrind/tests/tc19_shadowmem.c
-tc19_shadowmem_LDADD = -lpthread
-
-tc21_pthonce_SOURCES = ../../helgrind/tests/tc21_pthonce.c
-tc21_pthonce_LDADD = -lpthread
-
-tc22_exit_w_lock_SOURCES = ../../helgrind/tests/tc22_exit_w_lock.c
-tc22_exit_w_lock_LDADD = -lpthread
-
-tc23_bogus_condwait_SOURCES = ../../helgrind/tests/tc23_bogus_condwait.c
-tc23_bogus_condwait_LDADD = -lpthread
-
-tc24_nonzero_sem_SOURCES = ../../helgrind/tests/tc24_nonzero_sem.c
-tc24_nonzero_sem_LDADD = -lpthread
-
-trylock_SOURCES = trylock.c
-trylock_LDADD = -lpthread
-
if HAVE_BOOST_1_35
boost_thread_SOURCES = boost_thread.cpp
boost_thread_CXXFLAGS = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
@@ -436,59 +258,33 @@
endif
if HAVE_OPENMP
-omp_matinv_SOURCES = omp_matinv.c
omp_matinv_CFLAGS = $(AM_CFLAGS) -fopenmp
omp_matinv_LDFLAGS = -fopenmp
-omp_matinv_LDADD = -lm
+omp_matinv_LDADD = $(LDADD) -lm
-omp_prime_SOURCES = omp_prime.c
omp_prime_CFLAGS = $(AM_CFLAGS) -fopenmp
omp_prime_LDFLAGS = -fopenmp
-omp_prime_LDADD = -lm
+omp_prime_LDADD = $(LDADD) -lm
-omp_printf_SOURCES = omp_printf.c
omp_printf_CFLAGS = $(AM_CFLAGS) -fopenmp
omp_printf_LDFLAGS = -fopenmp
-omp_printf_LDADD = -lm
+omp_printf_LDADD = $(LDADD) -lm
endif
if HAVE_PTHREAD_BARRIER
-bar_bad_SOURCES = ../../helgrind/tests/bar_bad.c
-bar_bad_LDADD = -lpthread
-
-bar_trivial_SOURCES = ../../helgrind/tests/bar_trivial.c
-bar_trivial_LDADD = -lpthread
-
-matinv_SOURCES = matinv.c
-matinv_LDADD = -lpthread -lm
-
-pth_barrier_SOURCES = pth_barrier.c
-pth_barrier_LDADD = -lpthread
-
-pth_barrier_reinit_SOURCES = pth_barrier_reinit.c
-pth_barrier_reinit_LDADD = -lpthread
+matinv_LDADD = $(LDADD) -lm
endif
-if HAVE_PTHREAD_MUTEX_TIMEDLOCK
-tc20_verifywrap_SOURCES = ../../helgrind/tests/tc20_verifywrap.c
-tc20_verifywrap_LDADD = -lpthread
-endif
-
-if HAVE_PTHREAD_SPINLOCK
-pth_spinlock_SOURCES = pth_spinlock.c
-pth_spinlock_LDADD = -lpthread
-endif
-
if HAVE_QTCORE
qt4_mutex_SOURCES = qt4_mutex.cpp
qt4_mutex_CXXFLAGS = $(AM_CXXFLAGS) $(QTCORE_CFLAGS)
-qt4_mutex_LDADD = $(QTCORE_LIBS)
+qt4_mutex_LDADD = $(LDADD) $(QTCORE_LIBS)
qt4_rwlock_SOURCES = qt4_rwlock.cpp
qt4_rwlock_CXXFLAGS = $(AM_CXXFLAGS) $(QTCORE_CFLAGS)
-qt4_rwlock_LDADD = $(QTCORE_LIBS)
+qt4_rwlock_LDADD = $(LDADD) $(QTCORE_LIBS)
qt4_semaphore_SOURCES = qt4_semaphore.cpp
qt4_semaphore_CXXFLAGS = $(AM_CXXFLAGS) $(QTCORE_CFLAGS)
-qt4_semaphore_LDADD = $(QTCORE_LIBS)
+qt4_semaphore_LDADD = $(LDADD) $(QTCORE_LIBS)
endif
Modified: branches/DARWIN/drd/tests/bar_bad.vgtest
===================================================================
--- branches/DARWIN/drd/tests/bar_bad.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/bar_bad.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
-prereq: test -e bar_bad && ./supported_libpthread
-prog: bar_bad
+prereq: test -e ../../helgrind/tests/bar_bad && ./supported_libpthread
+prog: ../../helgrind/tests/bar_bad
vgopts: -q
Modified: branches/DARWIN/drd/tests/bar_trivial.vgtest
===================================================================
--- branches/DARWIN/drd/tests/bar_trivial.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/bar_trivial.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
-prereq: test -e bar_trivial && ./supported_libpthread
-prog: bar_trivial
+prereq: test -e ../../helgrind/tests/bar_trivial && ./supported_libpthread
+prog: ../../helgrind/tests/bar_trivial
vgopts: -q
Modified: branches/DARWIN/drd/tests/hg01_all_ok.vgtest
===================================================================
--- branches/DARWIN/drd/tests/hg01_all_ok.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/hg01_all_ok.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: hg01_all_ok
+prog: ../../helgrind/tests/hg01_all_ok
Modified: branches/DARWIN/drd/tests/hg02_deadlock.vgtest
===================================================================
--- branches/DARWIN/drd/tests/hg02_deadlock.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/hg02_deadlock.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: hg02_deadlock
+prog: ../../helgrind/tests/hg02_deadlock
Modified: branches/DARWIN/drd/tests/hg03_inherit.vgtest
===================================================================
--- branches/DARWIN/drd/tests/hg03_inherit.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/hg03_inherit.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --show-confl-seg=no --var-info=yes
-prog: hg03_inherit
+prog: ../../helgrind/tests/hg03_inherit
Modified: branches/DARWIN/drd/tests/hg04_race.vgtest
===================================================================
--- branches/DARWIN/drd/tests/hg04_race.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/hg04_race.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --var-info=yes
-prog: hg04_race
+prog: ../../helgrind/tests/hg04_race
Modified: branches/DARWIN/drd/tests/hg05_race2.vgtest
===================================================================
--- branches/DARWIN/drd/tests/hg05_race2.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/hg05_race2.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --var-info=yes --check-stack-var=yes
-prog: hg05_race2
+prog: ../../helgrind/tests/hg05_race2
Modified: branches/DARWIN/drd/tests/hg06_readshared.vgtest
===================================================================
--- branches/DARWIN/drd/tests/hg06_readshared.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/hg06_readshared.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: hg06_readshared
+prog: ../../helgrind/tests/hg06_readshared
Deleted: branches/DARWIN/drd/tests/pth_barrier.c
===================================================================
--- branches/DARWIN/drd/tests/pth_barrier.c 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/pth_barrier.c 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,110 +0,0 @@
-/* Test whether all data races are detected in a multithreaded program with
- * barriers.
- */
-
-
-#define _GNU_SOURCE
-
-/***********************/
-/* Include directives. */
-/***********************/
-
-#include <assert.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/*********************/
-/* Type definitions. */
-/*********************/
-
-struct threadinfo
-{
- pthread_barrier_t* b;
- pthread_t tid;
- int* array;
- int iterations;
-};
-
-
-/********************/
-/* Local variables. */
-/********************/
-
-static int s_silent;
-
-
-/*************************/
-/* Function definitions. */
-/*************************/
-
-/** Single thread, which touches p->iterations elements of array p->array.
- * Each modification of an element of p->array is a data race. */
-static void* threadfunc(struct threadinfo* p)
-{
- int i;
- int* const array = p->array;
- pthread_barrier_t* const b = p->b;
- if (! s_silent)
- printf("thread %lx iteration 0\n", pthread_self());
- pthread_barrier_wait(b);
- for (i = 0; i < p->iterations; i++)
- {
- if (! s_silent)
- printf("thread %lx iteration %d; writing to %p\n",
- pthread_self(), i + 1, &array[i]);
- array[i] = i;
- pthread_barrier_wait(b);
- }
- return 0;
-}
-
-/** Actual test, consisting of nthread threads. */
-static void barriers_and_races(const int nthread, const int iterations)
-{
- int i;
- struct threadinfo* t;
- pthread_barrier_t b;
- int* array;
-
- t = malloc(nthread * sizeof(struct threadinfo));
- array = malloc(iterations * sizeof(array[0]));
-
- if (! s_silent)
- printf("&array[0] = %p\n", array);
-
- pthread_barrier_init(&b, 0, nthread);
-
- for (i = 0; i < nthread; i++)
- {
- t[i].b = &b;
- t[i].array = array;
- t[i].iterations = iterations;
- pthread_create(&t[i].tid, 0, (void*(*)(void*))threadfunc, &t[i]);
- }
-
- for (i = 0; i < nthread; i++)
- {
- pthread_join(t[i].tid, 0);
- }
-
- pthread_barrier_destroy(&b);
-
- free(array);
- free(t);
-}
-
-int main(int argc, char** argv)
-{
- int nthread;
- int iterations;
-
- nthread = (argc > 1) ? atoi(argv[1]) : 2;
- iterations = (argc > 2) ? atoi(argv[2]) : 3;
- s_silent = (argc > 3) ? atoi(argv[3]) : 0;
-
- barriers_and_races(nthread, iterations);
-
- return 0;
-}
Copied: branches/DARWIN/drd/tests/pth_barrier.c (from rev 9206, trunk/drd/tests/pth_barrier.c)
===================================================================
--- branches/DARWIN/drd/tests/pth_barrier.c (rev 0)
+++ branches/DARWIN/drd/tests/pth_barrier.c 2009-02-23 01:57:26 UTC (rev 9229)
@@ -0,0 +1,110 @@
+/* Test whether all data races are detected in a multithreaded program with
+ * barriers.
+ */
+
+
+#define _GNU_SOURCE
+
+/***********************/
+/* Include directives. */
+/***********************/
+
+#include <assert.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/*********************/
+/* Type definitions. */
+/*********************/
+
+struct threadinfo
+{
+ pthread_barrier_t* b;
+ pthread_t tid;
+ int* array;
+ int iterations;
+};
+
+
+/********************/
+/* Local variables. */
+/********************/
+
+static int s_silent;
+
+
+/*************************/
+/* Function definitions. */
+/*************************/
+
+/** Single thread, which touches p->iterations elements of array p->array.
+ * Each modification of an element of p->array is a data race. */
+static void* threadfunc(struct threadinfo* p)
+{
+ int i;
+ int* const array = p->array;
+ pthread_barrier_t* const b = p->b;
+ if (! s_silent)
+ printf("thread %lx iteration 0\n", pthread_self());
+ pthread_barrier_wait(b);
+ for (i = 0; i < p->iterations; i++)
+ {
+ if (! s_silent)
+ printf("thread %lx iteration %d; writing to %p\n",
+ pthread_self(), i + 1, &array[i]);
+ array[i] = i;
+ pthread_barrier_wait(b);
+ }
+ return 0;
+}
+
+/** Actual test, consisting of nthread threads. */
+static void barriers_and_races(const int nthread, const int iterations)
+{
+ int i;
+ struct threadinfo* t;
+ pthread_barrier_t b;
+ int* array;
+
+ t = malloc(nthread * sizeof(struct threadinfo));
+ array = malloc(iterations * sizeof(array[0]));
+
+ if (! s_silent)
+ printf("&array[0] = %p\n", array);
+
+ pthread_barrier_init(&b, 0, nthread);
+
+ for (i = 0; i < nthread; i++)
+ {
+ t[i].b = &b;
+ t[i].array = array;
+ t[i].iterations = iterations;
+ pthread_create(&t[i].tid, 0, (void*(*)(void*))threadfunc, &t[i]);
+ }
+
+ for (i = 0; i < nthread; i++)
+ {
+ pthread_join(t[i].tid, 0);
+ }
+
+ pthread_barrier_destroy(&b);
+
+ free(array);
+ free(t);
+}
+
+int main(int argc, char** argv)
+{
+ int nthread;
+ int iterations;
+
+ nthread = (argc > 1) ? atoi(argv[1]) : 2;
+ iterations = (argc > 2) ? atoi(argv[2]) : 3;
+ s_silent = (argc > 3) ? atoi(argv[3]) : 0;
+
+ barriers_and_races(nthread, iterations);
+
+ return 0;
+}
Deleted: branches/DARWIN/drd/tests/rwlock_race.c
===================================================================
--- branches/DARWIN/drd/tests/rwlock_race.c 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/rwlock_race.c 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,56 +0,0 @@
-/** Cause a race inside code protected by a reader lock.
- */
-
-
-/* Needed for older glibc's (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 <unistd.h>
-
-
-
-static pthread_rwlock_t s_rwlock;
-static int s_racy;
-
-static void sleep_ms(const int ms)
-{
- struct timespec delay = { ms / 1000, (ms % 1000) * 1000 * 1000 };
- nanosleep(&delay, 0);
-}
-
-static void* thread_func(void* arg)
-{
- pthread_rwlock_rdlock(&s_rwlock);
- s_racy++;
- pthread_rwlock_unlock(&s_rwlock);
- sleep_ms(100);
- return 0;
-}
-
-int main(int argc, char** argv)
-{
- pthread_t thread1;
- pthread_t thread2;
-
-#if 0
- int res;
- VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__DRD_TRACE_ADDR,
- &s_racy, 0, 0, 0, 0);
-#endif
-
- pthread_rwlock_init(&s_rwlock, 0);
- pthread_create(&thread1, 0, thread_func, 0);
- pthread_create(&thread2, 0, thread_func, 0);
- pthread_join(thread1, 0);
- pthread_join(thread2, 0);
- pthread_rwlock_destroy(&s_rwlock);
-
- fprintf(stderr, "Result: %d\n", s_racy);
-
- return 0;
-}
Copied: branches/DARWIN/drd/tests/rwlock_race.c (from rev 9206, trunk/drd/tests/rwlock_race.c)
===================================================================
--- branches/DARWIN/drd/tests/rwlock_race.c (rev 0)
+++ branches/DARWIN/drd/tests/rwlock_race.c 2009-02-23 01:57:26 UTC (rev 9229)
@@ -0,0 +1,56 @@
+/** Cause a race inside code protected by a reader lock.
+ */
+
+
+/* Needed for older glibc's (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 <unistd.h>
+
+
+
+static pthread_rwlock_t s_rwlock;
+static int s_racy;
+
+static void sleep_ms(const int ms)
+{
+ struct timespec delay = { ms / 1000, (ms % 1000) * 1000 * 1000 };
+ nanosleep(&delay, 0);
+}
+
+static void* thread_func(void* arg)
+{
+ pthread_rwlock_rdlock(&s_rwlock);
+ s_racy++;
+ pthread_rwlock_unlock(&s_rwlock);
+ sleep_ms(100);
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ pthread_t thread1;
+ pthread_t thread2;
+
+#if 0
+ int res;
+ VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__DRD_TRACE_ADDR,
+ &s_racy, 0, 0, 0, 0);
+#endif
+
+ pthread_rwlock_init(&s_rwlock, 0);
+ pthread_create(&thread1, 0, thread_func, 0);
+ pthread_create(&thread2, 0, thread_func, 0);
+ pthread_join(thread1, 0);
+ pthread_join(thread2, 0);
+ pthread_rwlock_destroy(&s_rwlock);
+
+ fprintf(stderr, "Result: %d\n", s_racy);
+
+ return 0;
+}
Deleted: branches/DARWIN/drd/tests/rwlock_test.c
===================================================================
--- branches/DARWIN/drd/tests/rwlock_test.c 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/rwlock_test.c 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,52 +0,0 @@
-/** Multithreaded test program that triggers various access patterns without
- * triggering any race conditions.
- */
-
-
-#define _GNU_SOURCE 1
-
-#include <pthread.h>
-#include <stdio.h>
-
-
-static pthread_rwlock_t s_rwlock;
-static int s_counter;
-
-static void* thread_func(void* arg)
-{
- int i;
- int sum = 0;
-
- for (i = 0; i < 1000; i++)
- {
- pthread_rwlock_rdlock(&s_rwlock);
- sum += s_counter;
- pthread_rwlock_unlock(&s_rwlock);
- pthread_rwlock_wrlock(&s_rwlock);
- s_counter++;
- pthread_rwlock_unlock(&s_rwlock);
- }
-
- return 0;
-}
-
-int main(int argc, char** argv)
-{
- const int thread_count = 10;
- pthread_t tid[thread_count];
- int i;
-
- for (i = 0; i < thread_count; i++)
- {
- pthread_create(&tid[i], 0, thread_func, 0);
- }
-
- for (i = 0; i < thread_count; i++)
- {
- pthread_join(tid[i], 0);
- }
-
- fprintf(stderr, "Finished.\n");
-
- return 0;
-}
Copied: branches/DARWIN/drd/tests/rwlock_test.c (from rev 9206, trunk/drd/tests/rwlock_test.c)
===================================================================
--- branches/DARWIN/drd/tests/rwlock_test.c (rev 0)
+++ branches/DARWIN/drd/tests/rwlock_test.c 2009-02-23 01:57:26 UTC (rev 9229)
@@ -0,0 +1,52 @@
+/** Multithreaded test program that triggers various access patterns without
+ * triggering any race conditions.
+ */
+
+
+#define _GNU_SOURCE 1
+
+#include <pthread.h>
+#include <stdio.h>
+
+
+static pthread_rwlock_t s_rwlock;
+static int s_counter;
+
+static void* thread_func(void* arg)
+{
+ int i;
+ int sum = 0;
+
+ for (i = 0; i < 1000; i++)
+ {
+ pthread_rwlock_rdlock(&s_rwlock);
+ sum += s_counter;
+ pthread_rwlock_unlock(&s_rwlock);
+ pthread_rwlock_wrlock(&s_rwlock);
+ s_counter++;
+ pthread_rwlock_unlock(&s_rwlock);
+ }
+
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ const int thread_count = 10;
+ pthread_t tid[thread_count];
+ int i;
+
+ for (i = 0; i < thread_count; i++)
+ {
+ pthread_create(&tid[i], 0, thread_func, 0);
+ }
+
+ for (i = 0; i < thread_count; i++)
+ {
+ pthread_join(tid[i], 0);
+ }
+
+ fprintf(stderr, "Finished.\n");
+
+ return 0;
+}
Modified: branches/DARWIN/drd/tests/rwlock_test.stderr.exp
===================================================================
--- branches/DARWIN/drd/tests/rwlock_test.stderr.exp 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/rwlock_test.stderr.exp 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1 +1,4 @@
-valgrind: ./rwlock_vgtest: No such file or directory
+
+Finished.
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: branches/DARWIN/drd/tests/rwlock_test.vgtest
===================================================================
--- branches/DARWIN/drd/tests/rwlock_test.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/rwlock_test.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1 +1 @@
-prog: rwlock_vgtest
+prog: rwlock_test
Modified: branches/DARWIN/drd/tests/tc01_simple_race.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc01_simple_race.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc01_simple_race.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --var-info=yes
-prog: tc01_simple_race
+prog: ../../helgrind/tests/tc01_simple_race
Modified: branches/DARWIN/drd/tests/tc02_simple_tls.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc02_simple_tls.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc02_simple_tls.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc02_simple_tls
+prog: ../../helgrind/tests/tc02_simple_tls
Modified: branches/DARWIN/drd/tests/tc03_re_excl.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc03_re_excl.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc03_re_excl.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc03_re_excl
+prog: ../../helgrind/tests/tc03_re_excl
Modified: branches/DARWIN/drd/tests/tc04_free_lock.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc04_free_lock.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc04_free_lock.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --check-stack-var=yes
-prog: tc04_free_lock
+prog: ../../helgrind/tests/tc04_free_lock
Modified: branches/DARWIN/drd/tests/tc05_simple_race.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc05_simple_race.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc05_simple_race.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
-prog: tc05_simple_race
+prog: ../../helgrind/tests/tc05_simple_race
stderr_filter: filter_error_summary
Modified: branches/DARWIN/drd/tests/tc06_two_races.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc06_two_races.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc06_two_races.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
-prog: tc06_two_races
+prog: ../../helgrind/tests/tc06_two_races
stderr_filter: filter_error_summary
Modified: branches/DARWIN/drd/tests/tc07_hbl1.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc07_hbl1.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc07_hbl1.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc07_hbl1
+prog: ../../helgrind/tests/tc07_hbl1
Modified: branches/DARWIN/drd/tests/tc08_hbl2.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc08_hbl2.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc08_hbl2.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc08_hbl2
+prog: ../../helgrind/tests/tc08_hbl2
Modified: branches/DARWIN/drd/tests/tc09_bad_unlock.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc09_bad_unlock.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc09_bad_unlock.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --check-stack-var=yes
-prog: tc09_bad_unlock
+prog: ../../helgrind/tests/tc09_bad_unlock
Modified: branches/DARWIN/drd/tests/tc10_rec_lock.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc10_rec_lock.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc10_rec_lock.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc10_rec_lock
+prog: ../../helgrind/tests/tc10_rec_lock
Modified: branches/DARWIN/drd/tests/tc11_XCHG.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc11_XCHG.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc11_XCHG.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc11_XCHG
+prog: ../../helgrind/tests/tc11_XCHG
Modified: branches/DARWIN/drd/tests/tc12_rwl_trivial.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc12_rwl_trivial.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc12_rwl_trivial.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc12_rwl_trivial
+prog: ../../helgrind/tests/tc12_rwl_trivial
Modified: branches/DARWIN/drd/tests/tc13_laog1.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc13_laog1.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc13_laog1.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc13_laog1
+prog: ../../helgrind/tests/tc13_laog1
Modified: branches/DARWIN/drd/tests/tc15_laog_lockdel.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc15_laog_lockdel.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc15_laog_lockdel.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc15_laog_lockdel
+prog: ../../helgrind/tests/tc15_laog_lockdel
Modified: branches/DARWIN/drd/tests/tc16_byterace.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc16_byterace.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc16_byterace.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --var-info=yes
-prog: tc16_byterace
+prog: ../../helgrind/tests/tc16_byterace
Modified: branches/DARWIN/drd/tests/tc17_sembar.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc17_sembar.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc17_sembar.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc17_sembar
+prog: ../../helgrind/tests/tc17_sembar
Modified: branches/DARWIN/drd/tests/tc18_semabuse.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc18_semabuse.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc18_semabuse.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc18_semabuse
+prog: ../../helgrind/tests/tc18_semabuse
Modified: branches/DARWIN/drd/tests/tc19_shadowmem.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc19_shadowmem.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc19_shadowmem.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
-prog: tc19_shadowmem
+prog: ../../helgrind/tests/tc19_shadowmem
vgopts: --cmp-race-err-addrs=yes --error-limit=no
Modified: branches/DARWIN/drd/tests/tc20_verifywrap.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc20_verifywrap.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
-prereq: test -e tc20_verifywrap && ./supported_libpthread
+prereq: test -e ../../helgrind/tests/tc20_verifywrap && ./supported_libpthread
vgopts: --var-info=yes --check-stack-var=yes
-prog: tc20_verifywrap
+prog: ../../helgrind/tests/tc20_verifywrap
Modified: branches/DARWIN/drd/tests/tc20_verifywrap2.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc20_verifywrap2.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc20_verifywrap2.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
vgopts: --trace-mutex=yes --trace-cond=yes --trace-semaphore=yes --var-info=yes --check-stack-var=yes
-prog: tc20_verifywrap
+prog: ../../helgrind/tests/tc20_verifywrap
Modified: branches/DARWIN/drd/tests/tc21_pthonce.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc21_pthonce.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc21_pthonce.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc21_pthonce
+prog: ../../helgrind/tests/tc21_pthonce
Modified: branches/DARWIN/drd/tests/tc22_exit_w_lock.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc22_exit_w_lock.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc22_exit_w_lock.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc22_exit_w_lock
+prog: ../../helgrind/tests/tc22_exit_w_lock
Modified: branches/DARWIN/drd/tests/tc23_bogus_condwait.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc23_bogus_condwait.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc23_bogus_condwait.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
prereq: ./supported_libpthread
-prog: tc23_bogus_condwait
+prog: ../../helgrind/tests/tc23_bogus_condwait
Modified: branches/DARWIN/drd/tests/tc24_nonzero_sem.vgtest
===================================================================
--- branches/DARWIN/drd/tests/tc24_nonzero_sem.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/drd/tests/tc24_nonzero_sem.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,3 +1,3 @@
prereq: ./supported_libpthread
-prog: tc24_nonzero_sem
+prog: ../../helgrind/tests/tc24_nonzero_sem
vgopts: --hg-sanity-flags=111111
Modified: branches/DARWIN/exp-ptrcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,8 +1,4 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
-
-# For check-local and clean-local
include $(top_srcdir)/Makefile.tool-tests.am
#SUBDIRS = .
@@ -87,57 +83,21 @@
endif
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
- -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
- -I@VEX_DIR@/pub
-AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-AM_CXXFLAGS = $(AM_CFLAGS)
+AM_CFLAGS += $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
# To make it a bit more realistic, build hackedbz2.c with at
# least some optimisation.
-hackedbz2_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
+hackedbz2_CFLAGS = $(AM_CFLAGS) -O
# C ones
-add_SOURCES = add.c
-and_SOURCES = and.c
-arith_SOURCES = arith.c
-bad_percentify_SOURCES = bad_percentify.c
-base_SOURCES = base.c
-cmp_SOURCES = cmp.c
-fp_SOURCES = fp.c
-globalerr_SOURCE = globalerr.c
-hackedbz2_SOURCES = hackedbz2.c
-hp_bounds_SOURCES = hp_bounds.c
-hp_dangle_SOURCES = hp_dangle.c
-idiv_SOURCES = idiv.c
-imul_SOURCES = imul.c
-justify_SOURCES = justify.c
-mm_SOURCES = mm.c
-neg_SOURCES = neg.c
-not_SOURCES = not.c
-or_SOURCES = or.c
-partial_SOURCES = partial.c
-pth_create_SOURCES = pth_create.c
pth_create_LDADD = -lpthread
-pth_specific_SOURCES = pth_specific.c
pth_specific_LDADD = -lpthread
-realloc_SOURCES = realloc.c
-stackerr_SOURCES = stackerr.c
-strcpy_SOURCES = strcpy.c
-strlen_SOURCES = strlen.c
-sub_SOURCES = sub.c
-supp_SOURCES = supp.c
-syscall_SOURCES = syscall.c
-tricky_SOURCES = tricky.c
-unaligned_SOURCES = unaligned.c
-xor_SOURCES = xor.c
-zero_SOURCES = zero.c
# C++ ones
ccc_SOURCES = ccc.cpp
# Build shared object for preen_invars
-preen_invars_SOURCES = preen_invars.c
preen_invars_DEPENDENCIES = preen_invars_so.so
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
preen_invars_LDADD = -ldl
@@ -158,10 +118,7 @@
endif
endif
-preen_invars_so_so_SOURCES = preen_invars_so.c
-preen_invars_so_so_LDADD =
-preen_invars_so_so_DEPENDENCIES =
-preen_invars_so_so_CFLAGS = -fpic $(AM_FLAG_M3264_PRI) -g
+preen_invars_so_so_CFLAGS = $(AM_CFLAGS) -fpic
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
preen_invars_so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
else
Modified: branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,4 +1,4 @@
-# For check-local and clean-local
+
include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr
@@ -9,10 +9,9 @@
asm.vgtest-disabled asm.stderr.exp \
lea.vgtest-disabled lea.stderr.exp
-AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g \
- $(FLAG_MMMX) $(FLAG_MSSE)
-AM_CXXFLAGS = $(AM_CFLAGS)
+
+AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
+AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
AM_CCASFLAGS = @FLAG_M32@
asm_SOURCES = asm.S
Modified: branches/DARWIN/helgrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/helgrind/tests/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/helgrind/tests/Makefile.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,8 +1,4 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
-
-# For check-local and clean-local
include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr
@@ -130,8 +126,6 @@
hg04_race \
hg05_race2 \
hg06_readshared \
- rwlock_race \
- rwlock_test \
tc01_simple_race \
tc02_simple_tls \
tc03_re_excl \
@@ -151,26 +145,21 @@
tc17_sembar \
tc18_semabuse \
tc19_shadowmem \
- tc20_verifywrap \
tc21_pthonce \
tc22_exit_w_lock \
tc23_bogus_condwait \
tc24_nonzero_sem
if HAVE_PTHREAD_BARRIER
-check_PROGRAMS += bar_bad bar_trivial pth_barrier
+check_PROGRAMS += bar_bad bar_trivial
endif
+if HAVE_PTHREAD_MUTEX_TIMEDLOCK
+check_PROGRAMS += tc20_verifywrap
+endif
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
- -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
- -I@VEX_DIR@/pub
+AM_CFLAGS += $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
-# are these necessary?
-AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-LDADD = -lpthread
+LDADD = -lpthread
-# only needed because of referencing sources in drd/tests
-pth_barrier_SOURCES = ../../drd/tests/pth_barrier.c
-rwlock_race_SOURCES = ../../drd/tests/rwlock_race.c
-rwlock_test_SOURCES = ../../drd/tests/rwlock_test.c
Copied: branches/DARWIN/helgrind/tests/pth_barrier.c (from rev 9202, trunk/helgrind/tests/pth_barrier.c)
===================================================================
--- branches/DARWIN/helgrind/tests/pth_barrier.c (rev 0)
+++ branches/DARWIN/helgrind/tests/pth_barrier.c 2009-02-23 01:57:26 UTC (rev 9229)
@@ -0,0 +1,110 @@
+/* Test whether all data races are detected in a multithreaded program with
+ * barriers.
+ */
+
+
+#define _GNU_SOURCE
+
+/***********************/
+/* Include directives. */
+/***********************/
+
+#include <assert.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/*********************/
+/* Type definitions. */
+/*********************/
+
+struct threadinfo
+{
+ pthread_barrier_t* b;
+ pthread_t tid;
+ int* array;
+ int iterations;
+};
+
+
+/********************/
+/* Local variables. */
+/********************/
+
+static int s_silent;
+
+
+/*************************/
+/* Function definitions. */
+/*************************/
+
+/** Single thread, which touches p->iterations elements of array p->array.
+ * Each modification of an element of p->array is a data race. */
+static void* threadfunc(struct threadinfo* p)
+{
+ int i;
+ int* const array = p->array;
+ pthread_barrier_t* const b = p->b;
+ if (! s_silent)
+ printf("thread %lx iteration 0\n", pthread_self());
+ pthread_barrier_wait(b);
+ for (i = 0; i < p->iterations; i++)
+ {
+ if (! s_silent)
+ printf("thread %lx iteration %d; writing to %p\n",
+ pthread_self(), i + 1, &array[i]);
+ array[i] = i;
+ pthread_barrier_wait(b);
+ }
+ return 0;
+}
+
+/** Actual test, consisting of nthread threads. */
+static void barriers_and_races(const int nthread, const int iterations)
+{
+ int i;
+ struct threadinfo* t;
+ pthread_barrier_t b;
+ int* array;
+
+ t = malloc(nthread * sizeof(struct threadinfo));
+ array = malloc(iterations * sizeof(array[0]));
+
+ if (! s_silent)
+ printf("&array[0] = %p\n", array);
+
+ pthread_barrier_init(&b, 0, nthread);
+
+ for (i = 0; i < nthread; i++)
+ {
+ t[i].b = &b;
+ t[i].array = array;
+ t[i].iterations = iterations;
+ pthread_create(&t[i].tid, 0, (void*(*)(void*))threadfunc, &t[i]);
+ }
+
+ for (i = 0; i < nthread; i++)
+ {
+ pthread_join(t[i].tid, 0);
+ }
+
+ pthread_barrier_destroy(&b);
+
+ free(array);
+ free(t);
+}
+
+int main(int argc, char** argv)
+{
+ int nthread;
+ int iterations;
+
+ nthread = (argc > 1) ? atoi(argv[1]) : 2;
+ iterations = (argc > 2) ? atoi(argv[2]) : 3;
+ s_silent = (argc > 3) ? atoi(argv[3]) : 0;
+
+ barriers_and_races(nthread, iterations);
+
+ return 0;
+}
Modified: branches/DARWIN/helgrind/tests/pth_barrier1.vgtest
===================================================================
--- branches/DARWIN/helgrind/tests/pth_barrier1.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/helgrind/tests/pth_barrier1.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,4 +1,4 @@
prereq: test -e bar_trivial
-prog: pth_barrier
+prog: ../../drd/tests/pth_barrier
args: 2 1 1
vgopts: -q
Modified: branches/DARWIN/helgrind/tests/pth_barrier2.vgtest
===================================================================
--- branches/DARWIN/helgrind/tests/pth_barrier2.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/helgrind/tests/pth_barrier2.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,4 +1,4 @@
prereq: test -e bar_trivial
-prog: pth_barrier
+prog: ../../drd/tests/pth_barrier
args: 2 32 1
vgopts: -q --cmp-race-err-addrs=yes
Modified: branches/DARWIN/helgrind/tests/pth_barrier3.vgtest
===================================================================
--- branches/DARWIN/helgrind/tests/pth_barrier3.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/helgrind/tests/pth_barrier3.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,4 +1,4 @@
prereq: test -e bar_trivial
-prog: pth_barrier
+prog: ../../drd/tests/pth_barrier
args: 32 1 1
vgopts: -q
Copied: branches/DARWIN/helgrind/tests/rwlock_race.c (from rev 9202, trunk/helgrind/tests/rwlock_race.c)
===================================================================
--- branches/DARWIN/helgrind/tests/rwlock_race.c (rev 0)
+++ branches/DARWIN/helgrind/tests/rwlock_race.c 2009-02-23 01:57:26 UTC (rev 9229)
@@ -0,0 +1,56 @@
+/** Cause a race inside code protected by a reader lock.
+ */
+
+
+/* Needed for older glibc's (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 <unistd.h>
+
+
+
+static pthread_rwlock_t s_rwlock;
+static int s_racy;
+
+static void sleep_ms(const int ms)
+{
+ struct timespec delay = { ms / 1000, (ms % 1000) * 1000 * 1000 };
+ nanosleep(&delay, 0);
+}
+
+static void* thread_func(void* arg)
+{
+ pthread_rwlock_rdlock(&s_rwlock);
+ s_racy++;
+ pthread_rwlock_unlock(&s_rwlock);
+ sleep_ms(100);
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ pthread_t thread1;
+ pthread_t thread2;
+
+#if 0
+ int res;
+ VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__DRD_TRACE_ADDR,
+ &s_racy, 0, 0, 0, 0);
+#endif
+
+ pthread_rwlock_init(&s_rwlock, 0);
+ pthread_create(&thread1, 0, thread_func, 0);
+ pthread_create(&thread2, 0, thread_func, 0);
+ pthread_join(thread1, 0);
+ pthread_join(thread2, 0);
+ pthread_rwlock_destroy(&s_rwlock);
+
+ fprintf(stderr, "Result: %d\n", s_racy);
+
+ return 0;
+}
Modified: branches/DARWIN/helgrind/tests/rwlock_race.vgtest
===================================================================
--- branches/DARWIN/helgrind/tests/rwlock_race.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/helgrind/tests/rwlock_race.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,2 +1,2 @@
-prog: rwlock_race
+prog: ../../drd/tests/rwlock_race
vgopts: --read-var-info=yes
Copied: branches/DARWIN/helgrind/tests/rwlock_test.c (from rev 9202, trunk/helgrind/tests/rwlock_test.c)
===================================================================
--- branches/DARWIN/helgrind/tests/rwlock_test.c (rev 0)
+++ branches/DARWIN/helgrind/tests/rwlock_test.c 2009-02-23 01:57:26 UTC (rev 9229)
@@ -0,0 +1,52 @@
+/** Multithreaded test program that triggers various access patterns without
+ * triggering any race conditions.
+ */
+
+
+#define _GNU_SOURCE 1
+
+#include <pthread.h>
+#include <stdio.h>
+
+
+static pthread_rwlock_t s_rwlock;
+static int s_counter;
+
+static void* thread_func(void* arg)
+{
+ int i;
+ int sum = 0;
+
+ for (i = 0; i < 1000; i++)
+ {
+ pthread_rwlock_rdlock(&s_rwlock);
+ sum += s_counter;
+ pthread_rwlock_unlock(&s_rwlock);
+ pthread_rwlock_wrlock(&s_rwlock);
+ s_counter++;
+ pthread_rwlock_unlock(&s_rwlock);
+ }
+
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ const int thread_count = 10;
+ pthread_t tid[thread_count];
+ int i;
+
+ for (i = 0; i < thread_count; i++)
+ {
+ pthread_create(&tid[i], 0, thread_func, 0);
+ }
+
+ for (i = 0; i < thread_count; i++)
+ {
+ pthread_join(tid[i], 0);
+ }
+
+ fprintf(stderr, "Finished.\n");
+
+ return 0;
+}
Modified: branches/DARWIN/helgrind/tests/rwlock_test.vgtest
===================================================================
--- branches/DARWIN/helgrind/tests/rwlock_test.vgtest 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/helgrind/tests/rwlock_test.vgtest 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1 +1 @@
-prog: rwlock_test
+prog: ../../drd/tests/rwlock_test
Modified: branches/DARWIN/massif/tests/Makefile.am
===================================================================
--- branches/DARWIN/massif/tests/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/massif/tests/Makefile.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,8 +1,4 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
-
-# For check-local and clean-local
include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr filter_verbose
@@ -45,12 +41,6 @@
zero1.post.exp zero1.stderr.exp zero1.vgtest \
zero2.post.exp zero2.stderr.exp zero2.vgtest
-AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
- -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
- -I@VEX_DIR@/pub
-
check_PROGRAMS = \
alloc-fns \
basic \
@@ -73,6 +63,9 @@
thresholds \
zero
+AM_CFLAGS += $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
+
# C++ tests
new_cpp_SOURCES = new-cpp.cpp
overloaded_new_SOURCES = overloaded-new.cpp
Modified: branches/DARWIN/memcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/Makefile.am 2009-02-23 01:33:40 UTC (rev 9228)
+++ branches/DARWIN/memcheck/tests/Makefile.am 2009-02-23 01:57:26 UTC (rev 9229)
@@ -1,8 +1,4 @@
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
-
-# For check-local and clean-local
include $(top_srcdir)/Makefile.tool-tests.am
SUBDIRS = .
@@ -193,7 +189,7 @@
describe-block \
doublefree error_counts errs1 exitprog execve execve2 erringfds \
file_locking \
- fprw fwrite hello inits inline \
+ fprw fwrite inits inline \
leak-0 leak-cycle leak-pool leak-tree leak-regroot leakotron \
linux-syslog-syscall \
linux-syscalls-2007 \
@@ -228,24 +224,16 @@
wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
writev zeropage
+AM_CFLAGS += $(AM_FLAG_M3264_PRI)
+AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
- -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
- -I@VEX_DIR@/pub
-AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
-AM_CXXFLAGS = $(AM_CFLAGS)
-
# Extra stuff for C tests
-memcmptest_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -fno-builtin-memcmp
-oset_test_CFLAGS = $(AM_FLAG_M3264_PRI) \
- -DVGA_$(VGCONF_ARCH_PRI)=1 \
- -DVGO_$(VGCONF_OS)=1 \
- -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
-vcpu_bz2_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
-vcpu_fbench_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
-vcpu_fnfns_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
+memcmptest_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcmp
+vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2
vcpu_fnfns_LDADD = -lm
-wrap6_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
+wrap6_CFLAGS = $(AM_CFLAGS) -O2
# Don't allow GCC to inline memcpy(), because then we can't intercept it
overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy
@@ -255,17 +243,17 @@
supp2_SOURCES = supp.c
# To make it a bit more realistic, have some optimisation enabled
# for the varinfo tests. We still expect sane results.
-varinfo1_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-varinfo2_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g -Wno-shadow
-varinfo3_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-varinfo4_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-varinfo5_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-varinfo6_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-# This requires optimisation in order to get just one resulting error
-origin4_many_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-# Apply -O so as to run in reasonable time
-origin5_bz2_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
-origin6_fp_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -g
+varinfo1_CFLAGS = $(AM_CFLAGS) -O
+varinfo2_CFLAGS = $(AM_CFLAGS) -O -Wno-shadow
+varinfo3_CFLAGS = $(AM_CFLAGS) -O
+varinfo4_CFLAGS = $(AM_CFLAGS) -O
+varinfo5_CFLAGS = $(AM_CFLAGS) -O
+varinfo6_CFLAGS = $(AM_CFLAGS) -O
+# This requires optimisation in order to get just one resulting error.
+origin4_many_CFLAGS = $(AM_CFLAGS) -O
+# Apply -O so as to run in reasonable time.
+origin5_bz2_CFLAGS = $(AM_CFLAGS) -O
+origin6_fp_CFLAGS = $(AM_CFLAGS) -O
# C++ tests
mismatches_SOURCES = mismatches.cpp
@@ -273,7 +261,7 @@
new_override_SOURCES = new_override.cpp
deep_templates_SOURCES = deep_templates.cpp
long_namespace_xml_SOURCES = long_namespace_xml.cpp
-deep_templates_CXXFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -gstabs
+deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
@@ -282,13 +270,13 ...
[truncated message content] |
|
From: <sv...@va...> - 2009-02-23 01:18:17
|
Author: njn Date: 2009-02-23 01:18:06 +0000 (Mon, 23 Feb 2009) New Revision: 9227 Log: Some more test/build cleanups missed in prior commits. Modified: trunk/cachegrind/tests/x86/Makefile.am trunk/exp-ptrcheck/tests/x86/Makefile.am trunk/none/tests/x86/Makefile.am Modified: trunk/cachegrind/tests/x86/Makefile.am =================================================================== --- trunk/cachegrind/tests/x86/Makefile.am 2009-02-23 01:03:06 UTC (rev 9226) +++ trunk/cachegrind/tests/x86/Makefile.am 2009-02-23 01:18:06 UTC (rev 9227) @@ -1,3 +1,6 @@ + +include $(top_srcdir)/Makefile.tool-tests.am + noinst_SCRIPTS = filter_stderr EXTRA_DIST = $(noinst_SCRIPTS) \ @@ -6,7 +9,9 @@ check_PROGRAMS = \ fpu-28-108 -AM_CFLAGS = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g + +AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) +AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) AM_CCASFLAGS = @FLAG_M32@ fpu_28_108_SOURCES = fpu-28-108.S Modified: trunk/exp-ptrcheck/tests/x86/Makefile.am =================================================================== --- trunk/exp-ptrcheck/tests/x86/Makefile.am 2009-02-23 01:03:06 UTC (rev 9226) +++ trunk/exp-ptrcheck/tests/x86/Makefile.am 2009-02-23 01:18:06 UTC (rev 9227) @@ -1,4 +1,6 @@ +include $(top_srcdir)/Makefile.tool-tests.am + noinst_SCRIPTS = filter_stderr check_PROGRAMS = asm lea @@ -7,10 +9,9 @@ asm.vgtest-disabled asm.stderr.exp \ lea.vgtest-disabled lea.stderr.exp -AM_CPPFLAGS = -I$(top_srcdir)/include -AM_CFLAGS = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g \ - $(FLAG_MMMX) $(FLAG_MSSE) -AM_CXXFLAGS = $(AM_CFLAGS) + +AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) +AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) AM_CCASFLAGS = @FLAG_M32@ asm_SOURCES = asm.S Modified: trunk/none/tests/x86/Makefile.am =================================================================== --- trunk/none/tests/x86/Makefile.am 2009-02-23 01:03:06 UTC (rev 9226) +++ trunk/none/tests/x86/Makefile.am 2009-02-23 01:18:06 UTC (rev 9227) @@ -28,8 +28,8 @@ bug137714-x86.stderr.exp bug137714-x86.stdout.exp bug137714-x86.vgtest \ bug152818-x86.vgtest bug152818-x86.stdout.exp \ bug152818-x86.stderr.exp \ + cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \ cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \ - cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \ cse_fail.stderr.exp cse_fail.stdout.exp cse_fail.vgtest \ faultstatus.disabled faultstatus.stderr.exp \ fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \ |
|
From: <sv...@va...> - 2009-02-23 01:03:12
|
Author: njn Date: 2009-02-23 01:03:06 +0000 (Mon, 23 Feb 2009) New Revision: 9226 Log: Cleanup this Makefile.am like other recent test Makefile.am files. Modified: trunk/tests/Makefile.am Modified: trunk/tests/Makefile.am =================================================================== --- trunk/tests/Makefile.am 2009-02-23 00:36:02 UTC (rev 9225) +++ trunk/tests/Makefile.am 2009-02-23 01:03:06 UTC (rev 9226) @@ -1,6 +1,5 @@ -# For AM_FLAG_M3264_PRI -include $(top_srcdir)/Makefile.flags.am +include $(top_srcdir)/Makefile.tool-tests.am noinst_SCRIPTS = \ filter_addresses \ @@ -20,11 +19,6 @@ toobig-allocs \ true -AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI) -AM_CXXFLAGS = $(AM_CFLAGS) +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) -# generic C ones -arch_test_CFLAGS = $(AM_CFLAGS) \ - -DVGA_$(VGCONF_ARCH_PRI)=1 \ - -DVGO_$(VGCONF_OS)=1 \ - -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1 |
|
From: <sv...@va...> - 2009-02-23 00:36:06
|
Author: njn Date: 2009-02-23 00:36:02 +0000 (Mon, 23 Feb 2009) New Revision: 9225 Log: This should have gone in with r9222. Modified: trunk/callgrind/tests/Makefile.am Modified: trunk/callgrind/tests/Makefile.am =================================================================== --- trunk/callgrind/tests/Makefile.am 2009-02-23 00:16:53 UTC (rev 9224) +++ trunk/callgrind/tests/Makefile.am 2009-02-23 00:36:02 UTC (rev 9225) @@ -19,4 +19,7 @@ check_PROGRAMS = clreq simwork threads +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + threads_LDADD = -lpthread |
|
From: <sv...@va...> - 2009-02-23 00:16:58
|
Author: njn Date: 2009-02-23 00:16:53 +0000 (Mon, 23 Feb 2009) New Revision: 9224 Log: Merge r9223 (use dashes rather than underscores in library names) from the trunk. Modified: branches/DARWIN/Makefile.tool.am branches/DARWIN/coregrind/Makefile.am Modified: branches/DARWIN/Makefile.tool.am =================================================================== --- branches/DARWIN/Makefile.tool.am 2009-02-22 23:40:31 UTC (rev 9223) +++ branches/DARWIN/Makefile.tool.am 2009-02-23 00:16:53 UTC (rev 9224) @@ -7,110 +7,110 @@ LIBREPLACEMALLOC_X86_LINUX = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_x86_linux.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-linux.a LIBREPLACEMALLOC_AMD64_LINUX = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_amd64_linux.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-linux.a LIBREPLACEMALLOC_PPC32_LINUX = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc32_linux.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-linux.a LIBREPLACEMALLOC_PPC64_LINUX = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc64_linux.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a LIBREPLACEMALLOC_PPC32_AIX5 = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc32_aix5.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-aix5.a LIBREPLACEMALLOC_PPC64_AIX5 = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc64_aix5.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-aix5.a LIBREPLACEMALLOC_X86_DARWIN = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_x86_darwin.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-darwin.a LIBREPLACEMALLOC_AMD64_DARWIN = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_amd64_darwin.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-darwin.a COREGRIND_LIBS_X86_LINUX = \ - $(top_builddir)/coregrind/libcoregrind_x86_linux.a \ - @VEX_DIR@/libvex_x86_linux.a + $(top_builddir)/coregrind/libcoregrind-x86-linux.a \ + @VEX_DIR@/libvex-x86-linux.a COREGRIND_LIBS_AMD64_LINUX = \ - $(top_builddir)/coregrind/libcoregrind_amd64_linux.a \ - @VEX_DIR@/libvex_amd64_linux.a + $(top_builddir)/coregrind/libcoregrind-amd64-linux.a \ + @VEX_DIR@/libvex-amd64-linux.a COREGRIND_LIBS_PPC32_LINUX = \ - $(top_builddir)/coregrind/libcoregrind_ppc32_linux.a \ - @VEX_DIR@/libvex_ppc32_linux.a + $(top_builddir)/coregrind/libcoregrind-ppc32-linux.a \ + @VEX_DIR@/libvex-ppc32-linux.a COREGRIND_LIBS_PPC64_LINUX = \ - $(top_builddir)/coregrind/libcoregrind_ppc64_linux.a \ - @VEX_DIR@/libvex_ppc64_linux.a + $(top_builddir)/coregrind/libcoregrind-ppc64-linux.a \ + @VEX_DIR@/libvex-ppc64-linux.a COREGRIND_LIBS_PPC32_AIX5 = \ - $(top_builddir)/coregrind/libcoregrind_ppc32_aix5.a \ - @VEX_DIR@/libvex_ppc32_aix5.a + $(top_builddir)/coregrind/libcoregrind-ppc32-aix5.a \ + @VEX_DIR@/libvex-ppc32-aix5.a COREGRIND_LIBS_PPC64_AIX5 = \ - $(top_builddir)/coregrind/libcoregrind_ppc64_aix5.a \ - @VEX_DIR@/libvex_ppc64_aix5.a + $(top_builddir)/coregrind/libcoregrind-ppc64-aix5.a \ + @VEX_DIR@/libvex-ppc64-aix5.a COREGRIND_LIBS_X86_DARWIN = \ - $(top_builddir)/coregrind/libcoregrind_x86_darwin.a \ - @VEX_DIR@/libvex_x86_darwin.a + $(top_builddir)/coregrind/libcoregrind-x86-darwin.a \ + @VEX_DIR@/libvex-x86-darwin.a COREGRIND_LIBS_AMD64_DARWIN = \ - $(top_builddir)/coregrind/libcoregrind_amd64_darwin.a \ - @VEX_DIR@/libvex_amd64_darwin.a + $(top_builddir)/coregrind/libcoregrind-amd64-darwin.a \ + @VEX_DIR@/libvex-amd64-darwin.a ##.PHONY: @VEX_DIR@/libvex.a -@VEX_DIR@/libvex_x86_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-x86-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_x86_linux.a \ + libvex-x86-linux.a \ EXTRA_CFLAGS="$(AM_CFLAGS_X86_LINUX) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_amd64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-amd64-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_amd64_linux.a \ + libvex-amd64-linux.a \ EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_LINUX) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_ppc32_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-ppc32-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_ppc32_linux.a \ + libvex-ppc32-linux.a \ EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_LINUX) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_ppc64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-ppc64-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_ppc64_linux.a \ + libvex-ppc64-linux.a \ EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_LINUX) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_ppc32_aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-ppc32-aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X32" \ - libvex_ppc32_aix5.a \ + libvex-ppc32-aix5.a \ EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_AIX5) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_ppc64_aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-ppc64-aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X64" \ - libvex_ppc64_aix5.a \ + libvex-ppc64-aix5.a \ EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_AIX5) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_x86_darwin.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-x86-darwin.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_x86_darwin.a \ + libvex-x86-darwin.a \ EXTRA_CFLAGS="$(AM_CFLAGS_X86_DARWIN) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_amd64_darwin.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-amd64-darwin.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_amd64_darwin.a \ + libvex-amd64-darwin.a \ EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_DARWIN) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" Modified: branches/DARWIN/coregrind/Makefile.am =================================================================== --- branches/DARWIN/coregrind/Makefile.am 2009-02-22 23:40:31 UTC (rev 9223) +++ branches/DARWIN/coregrind/Makefile.am 2009-02-23 00:16:53 UTC (rev 9224) @@ -45,50 +45,50 @@ if VGCONF_PLATFORMS_INCLUDE_X86_LINUX noinst_PROGRAMS += vgpreload_core-x86-linux.so -pkglib_LIBRARIES += libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a -LIBVEX += libvex_x86_linux.a +pkglib_LIBRARIES += libcoregrind-x86-linux.a libreplacemalloc_toolpreload-x86-linux.a +LIBVEX += libvex-x86-linux.a endif if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX noinst_PROGRAMS += vgpreload_core-amd64-linux.so -pkglib_LIBRARIES += libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a -LIBVEX += libvex_amd64_linux.a +pkglib_LIBRARIES += libcoregrind-amd64-linux.a libreplacemalloc_toolpreload-amd64-linux.a +LIBVEX += libvex-amd64-linux.a endif if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX noinst_PROGRAMS += vgpreload_core-ppc32-linux.so -pkglib_LIBRARIES += libcoregrind_ppc32_linux.a libreplacemalloc_toolpreload_ppc32_linux.a -LIBVEX += libvex_ppc32_linux.a +pkglib_LIBRARIES += libcoregrind-ppc32-linux.a libreplacemalloc_toolpreload-ppc32-linux.a +LIBVEX += libvex-ppc32-linux.a endif if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX noinst_PROGRAMS += vgpreload_core-ppc64-linux.so -pkglib_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a -LIBVEX += libvex_ppc64_linux.a +pkglib_LIBRARIES += libcoregrind-ppc64-linux.a libreplacemalloc_toolpreload-ppc64-linux.a +LIBVEX += libvex-ppc64-linux.a endif if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5 noinst_PROGRAMS += vgpreload_core-ppc32-aix5.so -pkglib_LIBRARIES += libcoregrind_ppc32_aix5.a libreplacemalloc_toolpreload_ppc32_aix5.a -LIBVEX += libvex_ppc32_aix5.a +pkglib_LIBRARIES += libcoregrind-ppc32-aix5.a libreplacemalloc_toolpreload-ppc32-aix5.a +LIBVEX += libvex-ppc32-aix5.a endif if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5 noinst_PROGRAMS += vgpreload_core-ppc64-aix5.so -pkglib_LIBRARIES += libcoregrind_ppc64_aix5.a libreplacemalloc_toolpreload_ppc64_aix5.a -LIBVEX += libvex_ppc64_aix5.a +pkglib_LIBRARIES += libcoregrind-ppc64-aix5.a libreplacemalloc_toolpreload-ppc64-aix5.a +LIBVEX += libvex-ppc64-aix5.a endif if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN noinst_PROGRAMS += vgpreload_core-x86-darwin.so -pkglib_LIBRARIES += libcoregrind_x86_darwin.a libreplacemalloc_toolpreload_x86_darwin.a -LIBVEX += libvex_x86_darwin.a +pkglib_LIBRARIES += libcoregrind-x86-darwin.a libreplacemalloc_toolpreload-x86-darwin.a +LIBVEX += libvex-x86-darwin.a endif if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN noinst_PROGRAMS += vgpreload_core-amd64-darwin.so -pkglib_LIBRARIES += libcoregrind_amd64_darwin.a libreplacemalloc_toolpreload_amd64_darwin.a -LIBVEX += libvex_amd64_darwin.a +pkglib_LIBRARIES += libcoregrind-amd64-darwin.a libreplacemalloc_toolpreload-amd64-darwin.a +LIBVEX += libvex-amd64-darwin.a endif |
|
From: Julian S. <js...@ac...> - 2009-02-22 23:53:17
|
> Julian, didn't you have a PPC nightly test going at one point? We're no longer running a ppc64 box 24x7 (unnecessary energy hog). I do have a ppc32 box (ppc mac mini) that runs 24x7, but Memcheck is unusable on it, because the ultra-optimised strlen in ld.so causes thousands of false errors, and unfortunately ld.so is stripped so it's not interceptable. It would be best to enhance Memcheck so as to be able to handle the cleverness in the optimised strlen, but chasing down the root causes in Memcheck is very difficult. J |
|
From: <sv...@va...> - 2009-02-22 23:40:36
|
Author: sewardj Date: 2009-02-22 23:40:31 +0000 (Sun, 22 Feb 2009) New Revision: 9223 Log: Use dashes rather than underscores in library names (njn). Modified: trunk/Makefile.tool.am trunk/coregrind/Makefile.am Modified: trunk/Makefile.tool.am =================================================================== --- trunk/Makefile.tool.am 2009-02-22 23:38:10 UTC (rev 9222) +++ trunk/Makefile.tool.am 2009-02-22 23:40:31 UTC (rev 9223) @@ -7,84 +7,84 @@ LIBREPLACEMALLOC_X86_LINUX = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_x86_linux.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-linux.a LIBREPLACEMALLOC_AMD64_LINUX = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_amd64_linux.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-linux.a LIBREPLACEMALLOC_PPC32_LINUX = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc32_linux.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-linux.a LIBREPLACEMALLOC_PPC64_LINUX = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc64_linux.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a LIBREPLACEMALLOC_PPC32_AIX5 = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc32_aix5.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-aix5.a LIBREPLACEMALLOC_PPC64_AIX5 = \ - $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc64_aix5.a + $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-aix5.a COREGRIND_LIBS_X86_LINUX = \ - $(top_builddir)/coregrind/libcoregrind_x86_linux.a \ - @VEX_DIR@/libvex_x86_linux.a + $(top_builddir)/coregrind/libcoregrind-x86-linux.a \ + @VEX_DIR@/libvex-x86-linux.a COREGRIND_LIBS_AMD64_LINUX = \ - $(top_builddir)/coregrind/libcoregrind_amd64_linux.a \ - @VEX_DIR@/libvex_amd64_linux.a + $(top_builddir)/coregrind/libcoregrind-amd64-linux.a \ + @VEX_DIR@/libvex-amd64-linux.a COREGRIND_LIBS_PPC32_LINUX = \ - $(top_builddir)/coregrind/libcoregrind_ppc32_linux.a \ - @VEX_DIR@/libvex_ppc32_linux.a + $(top_builddir)/coregrind/libcoregrind-ppc32-linux.a \ + @VEX_DIR@/libvex-ppc32-linux.a COREGRIND_LIBS_PPC64_LINUX = \ - $(top_builddir)/coregrind/libcoregrind_ppc64_linux.a \ - @VEX_DIR@/libvex_ppc64_linux.a + $(top_builddir)/coregrind/libcoregrind-ppc64-linux.a \ + @VEX_DIR@/libvex-ppc64-linux.a COREGRIND_LIBS_PPC32_AIX5 = \ - $(top_builddir)/coregrind/libcoregrind_ppc32_aix5.a \ - @VEX_DIR@/libvex_ppc32_aix5.a + $(top_builddir)/coregrind/libcoregrind-ppc32-aix5.a \ + @VEX_DIR@/libvex-ppc32-aix5.a COREGRIND_LIBS_PPC64_AIX5 = \ - $(top_builddir)/coregrind/libcoregrind_ppc64_aix5.a \ - @VEX_DIR@/libvex_ppc64_aix5.a + $(top_builddir)/coregrind/libcoregrind-ppc64-aix5.a \ + @VEX_DIR@/libvex-ppc64-aix5.a ##.PHONY: @VEX_DIR@/libvex.a -@VEX_DIR@/libvex_x86_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-x86-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_x86_linux.a \ + libvex-x86-linux.a \ EXTRA_CFLAGS="$(AM_CFLAGS_X86_LINUX) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_amd64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-amd64-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_amd64_linux.a \ + libvex-amd64-linux.a \ EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_LINUX) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_ppc32_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-ppc32-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_ppc32_linux.a \ + libvex-ppc32-linux.a \ EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_LINUX) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_ppc64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-ppc64-linux.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \ - libvex_ppc64_linux.a \ + libvex-ppc64-linux.a \ EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_LINUX) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_ppc32_aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-ppc32-aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X32" \ - libvex_ppc32_aix5.a \ + libvex-ppc32-aix5.a \ EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_AIX5) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" -@VEX_DIR@/libvex_ppc64_aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h +@VEX_DIR@/libvex-ppc64-aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X64" \ - libvex_ppc64_aix5.a \ + libvex-ppc64-aix5.a \ EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_AIX5) @FLAG_WDECL_AFTER_STMT@ \ @FLAG_FNO_STACK_PROTECTOR@" Modified: trunk/coregrind/Makefile.am =================================================================== --- trunk/coregrind/Makefile.am 2009-02-22 23:38:10 UTC (rev 9222) +++ trunk/coregrind/Makefile.am 2009-02-22 23:40:31 UTC (rev 9223) @@ -35,38 +35,38 @@ if VGCONF_PLATFORMS_INCLUDE_X86_LINUX noinst_PROGRAMS += vgpreload_core-x86-linux.so -pkglib_LIBRARIES += libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a -LIBVEX += libvex_x86_linux.a +pkglib_LIBRARIES += libcoregrind-x86-linux.a libreplacemalloc_toolpreload-x86-linux.a +LIBVEX += libvex-x86-linux.a endif if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX noinst_PROGRAMS += vgpreload_core-amd64-linux.so -pkglib_LIBRARIES += libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a -LIBVEX += libvex_amd64_linux.a +pkglib_LIBRARIES += libcoregrind-amd64-linux.a libreplacemalloc_toolpreload-amd64-linux.a +LIBVEX += libvex-amd64-linux.a endif if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX noinst_PROGRAMS += vgpreload_core-ppc32-linux.so -pkglib_LIBRARIES += libcoregrind_ppc32_linux.a libreplacemalloc_toolpreload_ppc32_linux.a -LIBVEX += libvex_ppc32_linux.a +pkglib_LIBRARIES += libcoregrind-ppc32-linux.a libreplacemalloc_toolpreload-ppc32-linux.a +LIBVEX += libvex-ppc32-linux.a endif if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX noinst_PROGRAMS += vgpreload_core-ppc64-linux.so -pkglib_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a -LIBVEX += libvex_ppc64_linux.a +pkglib_LIBRARIES += libcoregrind-ppc64-linux.a libreplacemalloc_toolpreload-ppc64-linux.a +LIBVEX += libvex-ppc64-linux.a endif if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5 noinst_PROGRAMS += vgpreload_core-ppc32-aix5.so -pkglib_LIBRARIES += libcoregrind_ppc32_aix5.a libreplacemalloc_toolpreload_ppc32_aix5.a -LIBVEX += libvex_ppc32_aix5.a +pkglib_LIBRARIES += libcoregrind-ppc32-aix5.a libreplacemalloc_toolpreload-ppc32-aix5.a +LIBVEX += libvex-ppc32-aix5.a endif if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5 noinst_PROGRAMS += vgpreload_core-ppc64-aix5.so -pkglib_LIBRARIES += libcoregrind_ppc64_aix5.a libreplacemalloc_toolpreload_ppc64_aix5.a -LIBVEX += libvex_ppc64_aix5.a +pkglib_LIBRARIES += libcoregrind-ppc64-aix5.a libreplacemalloc_toolpreload-ppc64-aix5.a +LIBVEX += libvex-ppc64-aix5.a endif |
|
From: Nicholas N. <n.n...@gm...> - 2009-02-22 23:40:17
|
On Mon, Feb 23, 2009 at 12:28 AM, Bart Van Assche <bar...@gm...> wrote: > > As you can see both the command-line options -m64 and -m32 have been > passed to gcc for the linking step. That was probably unintentional ? Interestingly, this didn't cause problems on x86/Linux and AMD64/Linux. It's now fixed on the trunk. Thanks for the report -- it's inevitable that I'll occasionally break PPC stuff with the Darwin-related changes I'm making, because I don't have access to a PPC machine to test on. So it's useful to get these reports, and the cellbuzz nightly tests. Julian, didn't you have a PPC nightly test going at one point? Nick |