You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(16) |
2
(23) |
3
(15) |
|
4
(19) |
5
(21) |
6
(27) |
7
(18) |
8
(17) |
9
(15) |
10
(11) |
|
11
(9) |
12
(18) |
13
(26) |
14
(28) |
15
(26) |
16
(20) |
17
(27) |
|
18
(16) |
19
(40) |
20
(2) |
21
(11) |
22
(27) |
23
(24) |
24
(16) |
|
25
(10) |
26
(12) |
27
(16) |
28
(7) |
29
(6) |
30
(15) |
31
(5) |
|
From: <sv...@va...> - 2005-12-05 22:11:55
|
Author: dirk
Date: 2005-12-05 22:11:52 +0000 (Mon, 05 Dec 2005)
New Revision: 5290
Log:
more syscalls for PPC32
Modified:
branches/VALGRIND_3_1_BRANCH/coregrind/m_syswrap/syswrap-ppc32-linux.c
branches/VALGRIND_3_1_BRANCH/coregrind/vki_unistd-ppc32-linux.h
Modified: branches/VALGRIND_3_1_BRANCH/coregrind/m_syswrap/syswrap-ppc32-=
linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/coregrind/m_syswrap/syswrap-ppc32-linux.=
c 2005-12-05 22:11:02 UTC (rev 5289)
+++ branches/VALGRIND_3_1_BRANCH/coregrind/m_syswrap/syswrap-ppc32-linux.=
c 2005-12-05 22:11:52 UTC (rev 5290)
@@ -1636,7 +1636,7 @@
LINXY(__NR_sched_getparam, sys_sched_getparam), // 155
LINX_(__NR_sched_setscheduler, sys_sched_setscheduler), // 156
LINX_(__NR_sched_getscheduler, sys_sched_getscheduler), // 157
-//.. LINX_(__NR_sched_yield, sys_sched_yield), /=
/ 158
+ LINX_(__NR_sched_yield, sys_sched_yield), // 158
LINX_(__NR_sched_get_priority_max, sys_sched_get_priority_max),// 159
=20
LINX_(__NR_sched_get_priority_min, sys_sched_get_priority_min),// 160
@@ -1745,7 +1745,7 @@
//.. LINX_(__NR_timer_delete, sys_timer_delete), // 244
//.. LINX_(__NR_clock_settime, sys_clock_settime), // 245
LINXY(__NR_clock_gettime, sys_clock_gettime), // 246
-//.. LINXY(__NR_clock_getres, sys_clock_getres), // 247
+ LINXY(__NR_clock_getres, sys_clock_getres), // 247
//.. LINXY(__NR_clock_nanosleep, sys_clock_nanosleep), // 248
=20
// __NR_swapcontext // 249
Modified: branches/VALGRIND_3_1_BRANCH/coregrind/vki_unistd-ppc32-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/coregrind/vki_unistd-ppc32-linux.h 2005-=
12-05 22:11:02 UTC (rev 5289)
+++ branches/VALGRIND_3_1_BRANCH/coregrind/vki_unistd-ppc32-linux.h 2005-=
12-05 22:11:52 UTC (rev 5290)
@@ -276,7 +276,7 @@
//#define __NR_timer_delete 244
//#define __NR_clock_settime 245
#define __NR_clock_gettime 246
-//#define __NR_clock_getres 247
+#define __NR_clock_getres 247
//#define __NR_clock_nanosleep 248
//#define __NR_swapcontext 249
#define __NR_tgkill 250
|
|
From: <sv...@va...> - 2005-12-05 22:11:08
|
Author: dirk
Date: 2005-12-05 22:11:02 +0000 (Mon, 05 Dec 2005)
New Revision: 5289
Log:
more syscalls for PPC32
Modified:
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/vki_unistd-ppc32-linux.h
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2005-12-05 20:50:50 U=
TC (rev 5288)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2005-12-05 22:11:02 U=
TC (rev 5289)
@@ -1636,7 +1636,7 @@
LINXY(__NR_sched_getparam, sys_sched_getparam), // 155
LINX_(__NR_sched_setscheduler, sys_sched_setscheduler), // 156
LINX_(__NR_sched_getscheduler, sys_sched_getscheduler), // 157
-//.. LINX_(__NR_sched_yield, sys_sched_yield), /=
/ 158
+ LINX_(__NR_sched_yield, sys_sched_yield), // 158
LINX_(__NR_sched_get_priority_max, sys_sched_get_priority_max),// 159
=20
LINX_(__NR_sched_get_priority_min, sys_sched_get_priority_min),// 160
@@ -1745,7 +1745,7 @@
//.. LINX_(__NR_timer_delete, sys_timer_delete), // 244
//.. LINX_(__NR_clock_settime, sys_clock_settime), // 245
LINXY(__NR_clock_gettime, sys_clock_gettime), // 246
-//.. LINXY(__NR_clock_getres, sys_clock_getres), // 247
+ LINXY(__NR_clock_getres, sys_clock_getres), // 247
//.. LINXY(__NR_clock_nanosleep, sys_clock_nanosleep), // 248
=20
// __NR_swapcontext // 249
Modified: trunk/coregrind/vki_unistd-ppc32-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vki_unistd-ppc32-linux.h 2005-12-05 20:50:50 UTC (rev=
5288)
+++ trunk/coregrind/vki_unistd-ppc32-linux.h 2005-12-05 22:11:02 UTC (rev=
5289)
@@ -276,7 +276,7 @@
//#define __NR_timer_delete 244
//#define __NR_clock_settime 245
#define __NR_clock_gettime 246
-//#define __NR_clock_getres 247
+#define __NR_clock_getres 247
//#define __NR_clock_nanosleep 248
//#define __NR_swapcontext 249
#define __NR_tgkill 250
|
|
From: <sv...@va...> - 2005-12-05 20:50:55
|
Author: sewardj
Date: 2005-12-05 20:50:50 +0000 (Mon, 05 Dec 2005)
New Revision: 5288
Log:
Discard translations at appropriate times when active bindings appear
or disappear. Also print error messages for new actives which conflict
with existing ones.
Modified:
branches/FNWRAP/coregrind/m_redir.c
Modified: branches/FNWRAP/coregrind/m_redir.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_redir.c 2005-12-05 20:45:59 UTC (rev 5287=
)
+++ branches/FNWRAP/coregrind/m_redir.c 2005-12-05 20:50:50 UTC (rev 5288=
)
@@ -154,19 +154,7 @@
- if each active (s,d) deleted, discard (s,1) and (d,1)
*/
=20
-#define TRACE_REDIR(format, args...) \
- if (VG_(clo_trace_redir)) { VG_(message)(Vg_DebugMsg, format, ## args=
); }
=20
-static void* symtab_alloc(SizeT);
-static void symtab_free(void*);
-static HChar* symtab_strdup(HChar*);
-static Bool is_plausible_guest_addr(Addr);
-
-static void show_redir_state ( HChar* who );
-
-static void handle_maybe_load_notifier( HChar* symbol, Addr addr );
-
-
/*------------------------------------------------------------*/
/*--- REDIRECTION SPECIFICATIONS ---*/
/*------------------------------------------------------------*/
@@ -225,9 +213,24 @@
/* The active set is a fast lookup table */
static OSet* activeSet =3D NULL;
=20
+
+/*------------------------------------------------------------*/
+/*--- FWDses ---*/
+/*------------------------------------------------------------*/
+
static void maybe_add_active ( Active /*by value; callee copies*/ );
=20
+static void* symtab_alloc(SizeT);
+static void symtab_free(void*);
+static HChar* symtab_strdup(HChar*);
+static Bool is_plausible_guest_addr(Addr);
=20
+static void show_redir_state ( HChar* who );
+static void show_active ( HChar* left, Active* act );
+
+static void handle_maybe_load_notifier( HChar* symbol, Addr addr );
+
+
/*------------------------------------------------------------*/
/*--- NOTIFICATIONS ---*/
/*------------------------------------------------------------*/
@@ -413,25 +416,55 @@
conflicting bindings. */
static void maybe_add_active ( Active act )
{
- Active* old =3D VG_(OSet_Lookup)( activeSet, &act.from_addr );
+ HChar* what =3D NULL;
+ Active* old;
+
+ /* Complain and ignore manifestly bogus 'from' addresses.
+
+ Kludge: because this can get called befor the trampoline area (a
+ bunch of magic 'to' addresses) has its ownership changed from V
+ to C, we can't check the 'to' address similarly. Sigh.
+ */
+ if (!is_plausible_guest_addr(act.from_addr)) {
+ what =3D "redirection from-address is in non-executable area";
+ goto bad;
+ }
+
+ old =3D VG_(OSet_Lookup)( activeSet, &act.from_addr );
if (old) {
/* Dodgy. Conflicting binding. */
vg_assert(old->from_addr =3D=3D act.from_addr);
if (old->to_addr !=3D act.to_addr) {
- /* COMPLAIN */
/* we have to ignore it -- otherwise activeSet would contain
conflicting bindings. */
+ what =3D "new redirection conflicts with existing -- ignoring i=
t";
+ goto bad;
} else {
/* This appears to be a duplicate of an existing binding.
Safe(ish) -- ignore. */
- /* COMPLAIN if new and old parents differ */
+ /* XXXXXXXXXXX COMPLAIN if new and old parents differ */
}
} else {
Active* a =3D VG_(OSet_AllocNode)(activeSet, sizeof(Active));
vg_assert(a);
*a =3D act;
VG_(OSet_Insert)(activeSet, a);
+ /* Now that a new from->to redirection is in force, we need to
+ get rid of any translations intersecting 'from' in order that
+ they get redirected to 'to'. So discard them. Just for
+ paranoia (but, I believe, unnecessarily), discard 'to' as
+ well. */
+ VG_(discard_translations)( (Addr64)act.from_addr, 1,
+ "redir_new_SegInfo(from_addr)");
+ VG_(discard_translations)( (Addr64)act.to_addr, 1,
+ "redir_new_SegInfo(to_addr)");
}
+ return;
+
+ bad:
+ vg_assert(what);
+ VG_(message)(Vg_UserMsg, "WARNING: %s", what);
+ show_active(" ", &act);
}
=20
=20
@@ -480,10 +513,25 @@
&& act->parent_spec->seginfo !=3D NULL
&& act->parent_sym->seginfo !=3D NULL
&& (act->parent_spec->mark || act->parent_sym->mark);
+
+ /* While we're at it, a bit of paranoia: delete any actives
+ which don't have both feet in valid client executable
+ areas. */
+ if (!delMe) {
+ if (!is_plausible_guest_addr(act->from_addr)) delMe =3D True;
+ if (!is_plausible_guest_addr(act->to_addr)) delMe =3D True;
+ }
+
if (delMe) {
addrP =3D VG_(OSet_AllocNode)( tmpSet, sizeof(Addr) );
*addrP =3D act->from_addr;
VG_(OSet_Insert)( tmpSet, addrP );
+ /* While we have our hands on both the 'from' and 'to'
+ of this Active, do paranoid stuff with tt/tc. */
+ VG_(discard_translations)( (Addr64)act->from_addr, 1,
+ "redir_del_SegInfo(from_addr)");
+ VG_(discard_translations)( (Addr64)act->to_addr, 1,
+ "redir_del_SegInfo(to_addr)");
}
}
=20
|
|
From: Nicholas N. <nj...@cs...> - 2005-12-05 20:49:53
|
On Mon, 5 Dec 2005, sv...@va... wrote: > Author: njn > Date: 2005-12-05 20:45:59 +0000 (Mon, 05 Dec 2005) > New Revision: 5287 > > Log: > Change hp2ps to output .ps files in the same dir that the .hp input files > are in. This fixes bug #117686. > > Modified: > trunk/cachegrind/cg-ppc32.c > trunk/cachegrind/cg-ppc64.c > trunk/cachegrind/tests/filter_stderr > trunk/coregrind/m_main.c > trunk/coregrind/m_translate.c > trunk/docs/internals/roadmap.txt > trunk/include/vki-amd64-linux.h > trunk/include/vki-ppc32-linux.h > trunk/include/vki-ppc64-linux.h > trunk/massif/hp2ps/Main.c I just accidentally checked in a number of separate small changes with that commit. It doesn't really matter since I was going to commit them as-is anyway. Sorry for any confusion. Nick |
|
From: <sv...@va...> - 2005-12-05 20:46:07
|
Author: njn
Date: 2005-12-05 20:45:59 +0000 (Mon, 05 Dec 2005)
New Revision: 5287
Log:
Change hp2ps to output .ps files in the same dir that the .hp input files
are in. This fixes bug #117686.
Modified:
trunk/cachegrind/cg-ppc32.c
trunk/cachegrind/cg-ppc64.c
trunk/cachegrind/tests/filter_stderr
trunk/coregrind/m_main.c
trunk/coregrind/m_translate.c
trunk/docs/internals/roadmap.txt
trunk/include/vki-amd64-linux.h
trunk/include/vki-ppc32-linux.h
trunk/include/vki-ppc64-linux.h
trunk/massif/hp2ps/Main.c
Modified: trunk/cachegrind/cg-ppc32.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/cg-ppc32.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/cachegrind/cg-ppc32.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -49,6 +49,10 @@
// not important) in the regression test suite without filtering the
// x86/AMD64 one (which we want to see if it ever occurs in the
// regression test suite).
+ //
+ // If you change this message, please update
+ // cachegrind/tests/filter_stderr!
+ //
if (!all_caches_clo_defined) {
VG_(message)(Vg_DebugMsg,=20
"Warning: Cannot auto-detect cache config on PPC32, u=
sing one "
Modified: trunk/cachegrind/cg-ppc64.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/cg-ppc64.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/cachegrind/cg-ppc64.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -49,6 +49,10 @@
// not important) in the regression test suite without filtering the
// x86/AMD64 one (which we want to see if it ever occurs in the
// regression test suite).
+ //
+ // If you change this message, please update
+ // cachegrind/tests/filter_stderr!
+ //
if (!all_caches_clo_defined) {
VG_(message)(Vg_DebugMsg,=20
"Warning: Cannot auto-detect cache config on PPC64, u=
sing one "
Modified: trunk/cachegrind/tests/filter_stderr
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/tests/filter_stderr 2005-12-05 19:17:37 UTC (rev 528=
6)
+++ trunk/cachegrind/tests/filter_stderr 2005-12-05 20:45:59 UTC (rev 528=
7)
@@ -17,4 +17,4 @@
sed "/warning: Pentium 4 with 12 KB micro-op instruction trace cache/d" =
|
sed "/Simulating a 16 KB I-cache with 32 B lines/d" |
sed "/warning: L3 cache detected but ignored/d" |
-sed "/Warning: Cannot auto-detect cache config on PPC32, using one or mo=
re defaults/d"
+sed "/Warning: Cannot auto-detect cache config on PPC.., using one or mo=
re defaults/d"
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/coregrind/m_main.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -66,6 +66,7 @@
=20
static void print_all_stats ( void )
{
+ VG_(print_translation_stats)();
VG_(print_tt_tc_stats)();
VG_(print_scheduler_stats)();
VG_(print_ExeContext_stats)();
Modified: trunk/coregrind/m_translate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_translate.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/coregrind/m_translate.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -51,6 +51,35 @@
=20
=20
/*------------------------------------------------------------*/
+/*--- Stats ---*/
+/*------------------------------------------------------------*/
+
+static UInt n_SP_updates_fast =3D 0;
+static UInt n_SP_updates_generic_known =3D 0;
+static UInt n_SP_updates_generic_unknown =3D 0;
+
+void VG_(print_translation_stats) ( void )
+{
+ Char buf[6];
+ UInt n_SP_updates =3D n_SP_updates_fast + n_SP_updates_generic_known
+ + n_SP_updates_generic_unknown;
+ VG_(percentify)(n_SP_updates_fast, n_SP_updates, 1, 6, buf);
+ VG_(message)(Vg_DebugMsg,
+ "translate: fast SP updates identified: %,u (%s)",
+ n_SP_updates_fast, buf );
+
+ VG_(percentify)(n_SP_updates_generic_known, n_SP_updates, 1, 6, buf);
+ VG_(message)(Vg_DebugMsg,
+ "translate: generic_known SP updates identified: %,u (%s)",
+ n_SP_updates_generic_known, buf );
+
+ VG_(percentify)(n_SP_updates_generic_unknown, n_SP_updates, 1, 6, buf=
);
+ VG_(message)(Vg_DebugMsg,
+ "translate: generic_unknown SP updates identified: %,u (%s)",
+ n_SP_updates_generic_unknown, buf );
+}
+
+/*------------------------------------------------------------*/
/*--- %SP-update pass ---*/
/*------------------------------------------------------------*/
=20
@@ -147,6 +176,9 @@
dcall->fxState[0].size =3D layout->sizeof_SP; =
\
=
\
addStmtToIRBB( bb, IRStmt_Dirty(dcall) ); =
\
+ =
\
+ n_SP_updates_fast++; =
\
+ =
\
} while (0)
=20
for (i =3D 0; i < bb_in->stmts_used; i++) {
@@ -211,10 +243,14 @@
case -16: DO(new, 16); addStmtToIRBB(bb,st); delta =3D 0; co=
ntinue;
case 32: DO(die, 32); addStmtToIRBB(bb,st); delta =3D 0; co=
ntinue;
case -32: DO(new, 32); addStmtToIRBB(bb,st); delta =3D 0; co=
ntinue;
- default: goto generic;
+ default: =20
+ n_SP_updates_generic_known++;
+ goto generic;
}
} else {
IRTemp old_SP;
+ n_SP_updates_generic_unknown++;
+
generic:
/* Pass both the old and new SP values to this helper. */
old_SP =3D newIRTemp(bb->tyenv, typeof_SP);
Modified: trunk/docs/internals/roadmap.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/internals/roadmap.txt 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/docs/internals/roadmap.txt 2005-12-05 20:45:59 UTC (rev 5287)
@@ -29,7 +29,17 @@
=20
* Try to accelerate development for Darwin ?
=20
+Smaller things
+--------------
+* Consider using the following defaults:
+ --leak-check=3Dyes
+ --num-callers=3D20
=20
+* Expose some of m_redir's functionality to tools so that Memcheck
+ can replace strlen/strcmp on PPC32 (remove the 3.1.0 hack for this
+ which checked in m_redir.c if the current tool was Memcheck).
+
+
------------------------------------------------------------------------=
-----
3.1.1
------------------------------------------------------------------------=
-----
Modified: trunk/include/vki-amd64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki-amd64-linux.h 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/include/vki-amd64-linux.h 2005-12-05 20:45:59 UTC (rev 5287)
@@ -1,7 +1,6 @@
=20
/*--------------------------------------------------------------------*/
-/*--- AMD64/Linux-specific kernel interface. ---*/
-/*--- vki-amd64-linux.h ---*/
+/*--- AMD64/Linux-specific kernel interface. vki-amd64-linux.h ---*/
/*--------------------------------------------------------------------*/
=20
/*
Modified: trunk/include/vki-ppc32-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki-ppc32-linux.h 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/include/vki-ppc32-linux.h 2005-12-05 20:45:59 UTC (rev 5287)
@@ -1,7 +1,6 @@
=20
/*--------------------------------------------------------------------*/
-/*--- PPC32/Linux-specific kernel interface. ---*/
-/*--- ppc32-linux/vki-ppc32-linux.h ---*/
+/*--- PPC32/Linux-specific kernel interface. vki-ppc32-linux.h ---*/
/*--------------------------------------------------------------------*/
=20
/*
Modified: trunk/include/vki-ppc64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki-ppc64-linux.h 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/include/vki-ppc64-linux.h 2005-12-05 20:45:59 UTC (rev 5287)
@@ -1,7 +1,6 @@
=20
/*--------------------------------------------------------------------*/
-/*--- PPC64/Linux-specific kernel interface. ---*/
-/*--- ppc64-linux/vki-ppc64-linux.h ---*/
+/*--- PPC64/Linux-specific kernel interface. vki-ppc64-linux.h ---*/
/*--------------------------------------------------------------------*/
=20
/*
Modified: trunk/massif/hp2ps/Main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/massif/hp2ps/Main.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/massif/hp2ps/Main.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -147,9 +147,16 @@
baseName =3D copystring(Basename(pathName));
=20
hpfp =3D Fp(pathName, &hpfile, ".hp", "r");=20
- psfp =3D Fp(baseName, &psfile, ".ps", "w");=20
=20
- if (pflag) auxfp =3D Fp(baseName, &auxfile, ".aux", "r");
+ // I changed these two lines to use 'pathName' instead of
+ // 'baseName'. This means that the .ps and .aux files get put i=
n
+ // the same directory as the .hp file. This solved Valgrind bug=
t
+ // #117686. --njn=20
+// psfp =3D Fp(baseName, &psfile, ".ps", "w");=20
+ psfp =3D Fp(pathName, &psfile, ".ps", "w");=20
+
+// if (pflag) auxfp =3D Fp(baseName, &auxfile, ".aux", "r");
+ if (pflag) auxfp =3D Fp(pathName, &auxfile, ".aux", "r");
}
=20
GetHpFile(hpfp);
|
|
From: <sv...@va...> - 2005-12-05 19:17:42
|
Author: sewardj
Date: 2005-12-05 19:17:37 +0000 (Mon, 05 Dec 2005)
New Revision: 5286
Log:
Finish off handling of SegInfo disappearance in m_redir, and also
make function load-notification work again.
Modified:
branches/FNWRAP/coregrind/m_redir.c
branches/FNWRAP/coregrind/vg_preloaded.c
Modified: branches/FNWRAP/coregrind/m_redir.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_redir.c 2005-12-05 18:11:02 UTC (rev 5285=
)
+++ branches/FNWRAP/coregrind/m_redir.c 2005-12-05 19:17:37 UTC (rev 5286=
)
@@ -44,7 +44,9 @@
#include "pub_core_transtab.h"
#include "pub_core_tooliface.h" // VG_(needs).malloc_replacement
#include "pub_core_aspacemgr.h" // VG_(am_find_nsegment)
+#include "pub_core_clientstate.h" // VG_(client___libc_freeres_wrapper)
=20
+
/*------------------------------------------------------------*/
/*--- Semantics ---*/
/*------------------------------------------------------------*/
@@ -162,7 +164,9 @@
=20
static void show_redir_state ( HChar* who );
=20
+static void handle_maybe_load_notifier( HChar* symbol, Addr addr );
=20
+
/*------------------------------------------------------------*/
/*--- REDIRECTION SPECIFICATIONS ---*/
/*------------------------------------------------------------*/
@@ -172,11 +176,11 @@
spec can match an arbitrary number of times. */
typedef
struct _Spec {
- struct _Spec* next; /* linked list */
- HChar* from_sopatt; /* from soname pattern */
- const Char* from_fnpatt; /* from fnname pattern */
- Addr to_addr; /* where redirecting to */
- Bool mark; /* transient temporary used during matching */
+ struct _Spec* next; /* linked list */
+ HChar* from_sopatt; /* from soname pattern */
+ HChar* from_fnpatt; /* from fnname pattern */
+ Addr to_addr; /* where redirecting to */
+ Bool mark; /* transient temporary used during matching */
}
Spec;
=20
@@ -188,8 +192,8 @@
typedef
struct _TopSpec {
struct _TopSpec* next; /* linked list */
- SegInfo* seginfo; /* symbols etc */
- Spec* specs; /* specs pulled out of seginfo */
+ SegInfo* seginfo; /* symbols etc */
+ Spec* specs; /* specs pulled out of seginfo */
Bool mark; /* transient temporary used during deletion */
}
TopSpec;
@@ -275,7 +279,12 @@
VG_(seginfo_syms_getidx)( newsi, i, &sym_addr, NULL, &sym_name );
ok =3D VG_(maybe_Z_demangle)( sym_name, demangled_sopatt, N_DEMANG=
LED,
demangled_fnpatt, N_DEMANGLED );
- if (!ok) continue;
+ if (!ok) {
+ /* It's not a full-scale redirect, but perhaps it is a load-not=
ify
+ fn? Let the load-notify department see it. */
+ handle_maybe_load_notifier( sym_name, sym_addr );
+ continue;=20
+ }
spec =3D symtab_alloc(sizeof(Spec));
vg_assert(spec);
spec->from_sopatt =3D symtab_strdup(demangled_sopatt);
@@ -433,6 +442,9 @@
void VG_(redir_notify_delete_SegInfo)( SegInfo* delsi )
{
TopSpec* ts;
+ TopSpec* tsPrev;
+ Spec* sp;
+ Spec* sp_next;
OSet* tmpSet;
Active* act;
Bool delMe;
@@ -440,12 +452,19 @@
=20
vg_assert(delsi);
=20
- /* Search for it. */
- for (ts =3D topSpecs; ts; ts =3D ts->next)
- if (ts->seginfo =3D=3D delsi)
- break;
+ /* Search for it, and make tsPrev point to the previous entry, if
+ any. */
+ tsPrev =3D NULL;
+ ts =3D topSpecs;
+ while (True) {
+ if (ts =3D=3D NULL) break;
+ if (ts->seginfo =3D=3D delsi) break;
+ tsPrev =3D ts;
+ ts =3D ts->next;
+ }
=20
vg_assert(ts); /* else we don't have the deleted SegInfo */
+ vg_assert(ts->seginfo =3D=3D delsi);
=20
/* Traverse the actives, copying the addresses of those we intend
to delete into tmpSet. */
@@ -472,11 +491,29 @@
activeSet. */
VG_(OSet_ResetIter)( tmpSet );
while ( (addrP =3D VG_(OSet_Next)(tmpSet)) ) {
+ /* XXXXXXXXXXX invalidate translations */
VG_(OSet_Remove)( activeSet, addrP );
VG_(OSet_FreeNode)( activeSet, addrP );
}
=20
VG_(OSet_Destroy)( tmpSet );
+
+ /* The Actives set is now cleaned up. Free up this TopSpec and
+ everything hanging off it. */
+ for (sp =3D ts->specs; sp; sp =3D sp_next) {
+ if (sp->from_sopatt) symtab_free(sp->from_sopatt);
+ if (sp->from_fnpatt) symtab_free(sp->from_fnpatt);
+ sp_next =3D sp->next;
+ symtab_free(sp);
+ }
+
+ if (tsPrev =3D=3D NULL) {
+ /* first in list */
+ topSpecs =3D ts->next;
+ } else {
+ tsPrev->next =3D ts->next;
+ }
+ symtab_free(ts);
}
=20
=20
@@ -624,8 +661,9 @@
}
=20
=20
-//////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////
+/*------------------------------------------------------------*/
+/*--- MISC HELPERS ---*/
+/*------------------------------------------------------------*/
=20
static void* symtab_alloc(SizeT n)
{
@@ -642,7 +680,7 @@
return VG_(arena_strdup)(VG_AR_SYMTAB, str);
}
=20
-/* Really this should be merged with translations_allowable_from_seg
+/* Really this should be merged with translations_allowable_from_seg
in m_translate. */
static Bool is_plausible_guest_addr(Addr a)
{
@@ -652,40 +690,26 @@
&& (seg->hasX || seg->hasR); /* crude x86-specific hack */
}
=20
-//////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////
=20
+/*------------------------------------------------------------*/
+/*--- NOTIFY-ON-LOAD FUNCTIONS ---*/
+/*------------------------------------------------------------*/
=20
-// This is specifically for stringifying VG_(x) function names. We
-// need to do two macroexpansions to get the VG_ macro expanded before
-// stringifying.
-//zz #define _STR(x) #x
-//zz #define STR(x) _STR(x)
-//zz=20
-//zz static void handle_load_notifier( Char* symbol, Addr addr )
-//zz {
-//zz if (VG_(strcmp)(symbol, STR(VG_NOTIFY_ON_LOAD(freeres))) =3D=3D =
0)
-//zz VG_(client___libc_freeres_wrapper) =3D addr;
+static void handle_maybe_load_notifier( HChar* symbol, Addr addr )
+{
+ if (0 !=3D VG_(strncmp)(symbol, VG_NOTIFY_ON_LOAD_PREFIX,=20
+ VG_NOTIFY_ON_LOAD_PREFIX_LEN))
+ /* Doesn't have the right prefix */
+ return;
+
+ if (VG_(strcmp)(symbol, VG_STRINGIFY(VG_NOTIFY_ON_LOAD(freeres))) =3D=
=3D 0)
+ VG_(client___libc_freeres_wrapper) =3D addr;
// else
// if (VG_(strcmp)(symbol, STR(VG_WRAPPER(pthread_startfunc_wrapper))) =3D=
=3D 0)
// VG_(pthread_startfunc_wrapper)((Addr)(si->offset + sym->st_value))=
;
-//zz else
-//zz vg_assert2(0, "unrecognised load notification function: %s", =
symbol);
-//zz }
-//zz=20
-//zz static Bool is_replacement_function(Char* s)
-//zz {
-//zz return (0 =3D=3D VG_(strncmp)(s,
-//zz VG_REPLACE_FUNCTION_PREFIX,
-//zz VG_REPLACE_FUNCTION_PREFIX_LEN));
-//zz }
-//zz=20
-//zz static Bool is_load_notifier(Char* s)
-//zz {
-//zz return (0 =3D=3D VG_(strncmp)(s,
-//zz VG_NOTIFY_ON_LOAD_PREFIX,
-//zz VG_NOTIFY_ON_LOAD_PREFIX_LEN));
-//zz }
+ else
+ vg_assert2(0, "unrecognised load notification function: %s", symbo=
l);
+}
=20
=20
/*------------------------------------------------------------*/
Modified: branches/FNWRAP/coregrind/vg_preloaded.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/vg_preloaded.c 2005-12-05 18:11:02 UTC (rev=
5285)
+++ branches/FNWRAP/coregrind/vg_preloaded.c 2005-12-05 19:17:37 UTC (rev=
5286)
@@ -71,6 +71,8 @@
/*--- end ---*/
/*--------------------------------------------------------------------*/
=20
+#if 0
+
#define PTH_FUNC(ret_ty, f, args...) \
ret_ty VG_REDIRECT_FUNCTION_ZZ(libpthreadZdsoZd0,f)(args); \
ret_ty VG_REDIRECT_FUNCTION_ZZ(libpthreadZdsoZd0,f)(args)
@@ -125,3 +127,5 @@
fprintf(stderr, " -> %d >>\n", ret);
return ret;
}
+
+#endif
|
|
From: <sv...@va...> - 2005-12-05 18:11:11
|
Author: sewardj
Date: 2005-12-05 18:11:02 +0000 (Mon, 05 Dec 2005)
New Revision: 5285
Log:
Make the new redirection stuff work. Add debug printing to aid
diagnosis. Reinstate the basic 3 pthread wrappers we have so far.
Modified:
branches/FNWRAP/coregrind/m_debuginfo/symtab.c
branches/FNWRAP/coregrind/m_main.c
branches/FNWRAP/coregrind/m_redir.c
branches/FNWRAP/coregrind/vg_preloaded.c
Modified: branches/FNWRAP/coregrind/m_debuginfo/symtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_debuginfo/symtab.c 2005-12-05 14:26:59 UT=
C (rev 5284)
+++ branches/FNWRAP/coregrind/m_debuginfo/symtab.c 2005-12-05 18:11:02 UT=
C (rev 5285)
@@ -1436,7 +1436,10 @@
=20
o_phdr =3D &((ElfXX_Phdr *)(oimage + ehdr->e_phoff))[i];
=20
- // Try to get the soname.
+ /* Try to get the soname. If there isn't one, use "NONE".
+ The seginfo needs to have some kind of soname in order to
+ facilitate writing redirect functions, since all redirect
+ specifications require a soname (pattern). */
if (o_phdr->p_type =3D=3D PT_DYNAMIC && si->soname =3D=3D NULL) {
const ElfXX_Dyn *dyn =3D (const ElfXX_Dyn *)(oimage + o_phdr->p_off=
set);
Int stroff =3D -1;
@@ -1446,7 +1449,7 @@
for(j =3D 0; dyn[j].d_tag !=3D DT_NULL; j++) {
switch(dyn[j].d_tag) {
case DT_SONAME:
- stroff =3D dyn[j].d_un.d_val;
+ stroff =3D dyn[j].d_un.d_val;
break;
=20
case DT_STRTAB:
@@ -1510,6 +1513,13 @@
}
}
=20
+ /* If, after looking at all the program headers, we still didn't=20
+ find a soname, add a fake one. */
+ if (si->soname =3D=3D NULL) {
+ TRACE_SYMTAB("soname(fake)=3D\"NONE\"\n");
+ si->soname =3D "NONE";
+ }
+
TRACE_SYMTAB("shoff =3D %d, shnum =3D %d, size =3D %d, n_vg_oimage=
=3D %d\n",
ehdr->e_shoff, ehdr->e_shnum, sizeof(ElfXX_Shdr), n_oima=
ge );
=20
Modified: branches/FNWRAP/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_main.c 2005-12-05 14:26:59 UTC (rev 5284)
+++ branches/FNWRAP/coregrind/m_main.c 2005-12-05 18:11:02 UTC (rev 5285)
@@ -911,6 +911,7 @@
" --trace-signals=3Dno|yes show signal handling details? [no]\n"
" --trace-symtab=3Dno|yes show symbol table details? [no]\n"
" --trace-cfi=3Dno|yes show call-frame-info details? [no]\n"
+" --trace-redir=3Dno|yes show redirection details? [no]\n"
" --trace-sched=3Dno|yes show thread scheduler details? [no]\n"
" --wait-for-gdb=3Dyes|no pause on startup to wait for gdb attach=
\n"
#if 0
Modified: branches/FNWRAP/coregrind/m_redir.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_redir.c 2005-12-05 14:26:59 UTC (rev 5284=
)
+++ branches/FNWRAP/coregrind/m_redir.c 2005-12-05 18:11:02 UTC (rev 5285=
)
@@ -160,6 +160,9 @@
static HChar* symtab_strdup(HChar*);
static Bool is_plausible_guest_addr(Addr);
=20
+static void show_redir_state ( HChar* who );
+
+
/*------------------------------------------------------------*/
/*--- REDIRECTION SPECIFICATIONS ---*/
/*------------------------------------------------------------*/
@@ -256,6 +259,7 @@
HChar demangled_fnpatt[N_DEMANGLED];
=20
vg_assert(newsi);
+ vg_assert(VG_(seginfo_soname)(newsi) !=3D NULL);
=20
/* stay sane: we don't already have this. */
for (ts =3D topSpecs; ts; ts =3D ts->next)
@@ -332,6 +336,9 @@
/* Finally, add the new TopSpec. */
newts->next =3D topSpecs;
topSpecs =3D newts;
+
+ if (VG_(clo_trace_redir))
+ show_redir_state("after VG_(redir_notify_new_SegInfo)");
}
=20
#undef N_DEMANGLED
@@ -482,7 +489,7 @@
just before translating a basic block. */
Addr VG_(redir_do_lookup) ( Addr orig )
{
- Spec* r =3D VG_(OSet_Lookup)(activeSet, &orig);
+ Active* r =3D VG_(OSet_Lookup)(activeSet, &orig);
if (r =3D=3D NULL)
return orig;
=20
@@ -611,6 +618,9 @@
# else
# error Unknown platform
# endif
+
+ if (VG_(clo_trace_redir))
+ show_redir_state("after VG_(redir_initialise)");
}
=20
=20
@@ -832,6 +842,60 @@
}
=20
=20
+/*------------------------------------------------------------*/
+/*--- SANITY/DEBUG ---*/
+/*------------------------------------------------------------*/
+
+static void show_spec ( HChar* left, Spec* spec )
+{
+ VG_(message)(Vg_DebugMsg,=20
+ "%s%18s %22s -> 0x%08llx",
+ left,
+ spec->from_sopatt, spec->from_fnpatt,
+ (ULong)spec->to_addr );
+}
+
+static void show_active ( HChar* left, Active* act )
+{
+ Bool ok;
+ HChar name1[64] =3D "";
+ HChar name2[64] =3D "";
+ name1[0] =3D name2[0] =3D 0;
+ ok =3D VG_(get_fnname_w_offset)(act->from_addr, name1, 64);
+ if (!ok) VG_(strcpy)(name1, "???");
+ ok =3D VG_(get_fnname_w_offset)(act->to_addr, name2, 64);
+ if (!ok) VG_(strcpy)(name2, "???");
+
+ VG_(message)(Vg_DebugMsg, "%s0x%08llx (%10s) -> 0x%08llx %s",=20
+ left,=20
+ (ULong)act->from_addr, name1,
+ (ULong)act->to_addr, name2 );
+}
+
+static void show_redir_state ( HChar* who )
+{
+ TopSpec* ts;
+ Spec* sp;
+ Active* act;
+ VG_(message)(Vg_DebugMsg, "<<");
+ VG_(message)(Vg_DebugMsg, " ------ REDIR STATE %s ------", who);
+ for (ts =3D topSpecs; ts; ts =3D ts->next) {
+ VG_(message)(Vg_DebugMsg,=20
+ " TOPSPECS of soname %s",
+ ts->seginfo ? (HChar*)VG_(seginfo_soname)(ts->seginfo=
)
+ : "(hardwired)" );
+ for (sp =3D ts->specs; sp; sp =3D sp->next)
+ show_spec(" ", sp);
+ }
+ VG_(message)(Vg_DebugMsg, " ------ ACTIVE ------");
+ VG_(OSet_ResetIter)( activeSet );
+ while ( (act =3D VG_(OSet_Next)(activeSet)) ) {
+ show_active(" ", act);
+ }
+
+ VG_(message)(Vg_DebugMsg, ">>");
+}
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
Modified: branches/FNWRAP/coregrind/vg_preloaded.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/vg_preloaded.c 2005-12-05 14:26:59 UTC (rev=
5284)
+++ branches/FNWRAP/coregrind/vg_preloaded.c 2005-12-05 18:11:02 UTC (rev=
5285)
@@ -71,11 +71,9 @@
/*--- end ---*/
/*--------------------------------------------------------------------*/
=20
-#if 0
-
#define PTH_FUNC(ret_ty, f, args...) \
- ret_ty VG_REPLACE_FUNCTION(libpthreadZdsoZd0, f)(args); \
- ret_ty VG_REPLACE_FUNCTION(libpthreadZdsoZd0, f)(args)
+ ret_ty VG_REDIRECT_FUNCTION_ZZ(libpthreadZdsoZd0,f)(args); \
+ ret_ty VG_REDIRECT_FUNCTION_ZZ(libpthreadZdsoZd0,f)(args)
=20
#define LIBC_FUNC(ret_ty, f, args...) \
ret_ty VG_REPLACE_FUNCTION(libcZdsoZd6, f)(args); \
@@ -84,9 +82,11 @@
#include <stdio.h>
#include <pthread.h>
=20
-PTH_FUNC(int, pthread_create, // pthread_create@*
- pthread_t *thread, const pthread_attr_t *attr,
- void *(*start) (void *), void *arg)
+// pthread_create@GLIBC_2.0
+// pthread_create@@GLIBC_2.1
+PTH_FUNC(int, pthreadZucreateZAZa, // pthread_create@*
+ pthread_t *thread, const pthread_attr_t *attr,
+ void *(*start) (void *), void *arg)
{
int ret;
fprintf(stderr, "<< pthread_create wrapper"); fflush(stderr);
@@ -98,7 +98,9 @@
return ret;
}
=20
-PTH_FUNC(int, pthread_mutex_lock, pthread_mutex_t *mutex)
+// pthread_mutex_lock
+PTH_FUNC(int, pthreadZumutexZulock, // pthread_mutex_lock
+ pthread_mutex_t *mutex)
{
int ret;
fprintf(stderr, "<< pthread_mxlock %p", mutex); fflush(stderr);
@@ -110,7 +112,9 @@
return ret;
}
=20
-PTH_FUNC(int, pthread_mutex_unlock, pthread_mutex_t *mutex)
+// pthread_mutex_unlock
+PTH_FUNC(int, pthreadZumutexZuunlock, // pthread_mutex_unlock
+ pthread_mutex_t *mutex)
{
int ret;
fprintf(stderr, "<< pthread_mxunlk %p", mutex); fflush(stderr);
@@ -121,19 +125,3 @@
fprintf(stderr, " -> %d >>\n", ret);
return ret;
}
-
-#endif
-
-#if 0
-LIBC_FUNC(int, fclose, void* f)
-{
- int ret;
- fprintf(stderr, "<< fclose(%p)\n", f);
-
- VALGRIND_SET_NOREDIR;
- ret =3D fclose(f);
-
- fprintf(stderr, ">>\n");
- return ret;
-}
-#endif
|
|
From: Nicholas N. <nj...@cs...> - 2005-12-05 16:51:53
|
On Mon, 5 Dec 2005, Zhongxing Xu wrote: > I am doing a tool for valgrind named: floatcheck. > > I am a graduate student. I concern about floating-point roundoff error > for a long time, and wanted to doing something for it. I just found > valgrind a week ago. I think it may be suitable for the job. > > I don't have a very clear idea yet. The basic idea is to replicate the > storage of the original program and do a higher precision version with > that. Then we can compare the final results or give out warnings at > some critical point(e.g. disagreed branch point). > > I began reading documents and a little code of valgrind. I think the > floating-point part really needs to be strengthened. > > To my surprise, I find a similar idea on he project list today. > http://www.valgrind.org/help/projects.html > > Is there anybody doing related things to this? One or two other people have thought about it, but I don't think anybody made any real progress. One issue you may hit is that although x86/AMD64 have 80-bit double-precision floats, Valgrind only does them to 64-bit accuracy. Good luck with this. It would be an excellent tool if you could get it working well. I hope you have a good understanding of floating point arithmetic :) Nick |
|
From: Zhongxing Xu <xuz...@gm...> - 2005-12-05 15:06:36
|
Hi, I am doing a tool for valgrind named: floatcheck. I am a graduate student. I concern about floating-point roundoff error for a long time, and wanted to doing something for it. I just found valgrind a week ago. I think it may be suitable for the job. I don't have a very clear idea yet. The basic idea is to replicate the storage of the original program and do a higher precision version with that. Then we can compare the final results or give out warnings at some critical point(e.g. disagreed branch point). I began reading documents and a little code of valgrind. I think the floating-point part really needs to be strengthened. To my surprise, I find a similar idea on he project list today. http://www.valgrind.org/help/projects.html Is there anybody doing related things to this? Sincerely yours Zhongxing Xu Institute of Software Chinese Academy of Sciences |
|
From: <sv...@va...> - 2005-12-05 14:27:07
|
Author: sewardj
Date: 2005-12-05 14:26:59 +0000 (Mon, 05 Dec 2005)
New Revision: 5284
Log:
Get back to a buildable state, at least.
Modified:
branches/FNWRAP/coregrind/m_clientstate.c
branches/FNWRAP/coregrind/m_debuginfo/symtab.c
branches/FNWRAP/coregrind/m_main.c
branches/FNWRAP/coregrind/m_mallocfree.c
branches/FNWRAP/coregrind/m_redir.c
branches/FNWRAP/coregrind/m_replacemalloc/vg_replace_malloc.c
branches/FNWRAP/coregrind/m_translate.c
branches/FNWRAP/coregrind/pub_core_clientstate.h
branches/FNWRAP/coregrind/pub_core_debuginfo.h
branches/FNWRAP/coregrind/pub_core_redir.h
branches/FNWRAP/coregrind/vg_preloaded.c
branches/FNWRAP/include/pub_tool_debuginfo.h
branches/FNWRAP/include/pub_tool_redir.h
branches/FNWRAP/memcheck/mac_replace_strmem.c
Modified: branches/FNWRAP/coregrind/m_clientstate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_clientstate.c 2005-12-04 23:27:14 UTC (re=
v 5283)
+++ branches/FNWRAP/coregrind/m_clientstate.c 2005-12-05 14:26:59 UTC (re=
v 5284)
@@ -87,7 +87,11 @@
Int VG_(fd_soft_limit) =3D -1;
Int VG_(fd_hard_limit) =3D -1;
=20
+/* Useful addresses extracted from the client */
+/* Where is the __libc_freeres_wrapper routine we made? */
+Addr VG_(client___libc_freeres_wrapper) =3D 0;
=20
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
Modified: branches/FNWRAP/coregrind/m_debuginfo/symtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_debuginfo/symtab.c 2005-12-04 23:27:14 UT=
C (rev 5283)
+++ branches/FNWRAP/coregrind/m_debuginfo/symtab.c 2005-12-05 14:26:59 UT=
C (rev 5284)
@@ -29,6 +29,11 @@
The GNU General Public License is contained in the file COPYING.
*/
=20
+/*
+ Stabs reader greatly improved by Nick Nethercote, Apr 02.
+*/
+
+
#include "pub_core_basics.h"
#include "pub_core_threadstate.h"
#include "pub_core_debuginfo.h"
@@ -221,34 +226,6 @@
=20
=20
/*------------------------------------------------------------*/
-/*--- ---*/
-/*------------------------------------------------------------*/
-
-/* Majorly rewritten Sun 3 Feb 02 to enable loading symbols from
- dlopen()ed libraries, which is something that KDE3 does a lot.
-
- Stabs reader greatly improved by Nick Nethercote, Apr 02.
-*/
-
-static void freeSegInfo ( SegInfo* si )
-{
- struct strchunk *chunk, *next;
- vg_assert(si !=3D NULL);
- if (si->filename) VG_(arena_free)(VG_AR_SYMTAB, si->filename);
- if (si->symtab) VG_(arena_free)(VG_AR_SYMTAB, si->symtab);
- if (si->loctab) VG_(arena_free)(VG_AR_SYMTAB, si->loctab);
- if (si->scopetab) VG_(arena_free)(VG_AR_SYMTAB, si->scopetab);
- if (si->cfisi) VG_(arena_free)(VG_AR_SYMTAB, si->cfisi);
-
- for(chunk =3D si->strchunks; chunk !=3D NULL; chunk =3D next) {
- next =3D chunk->next;
- VG_(arena_free)(VG_AR_SYMTAB, chunk);
- }
- VG_(arena_free)(VG_AR_SYMTAB, si);
-}
-
-
-/*------------------------------------------------------------*/
/*--- Adding stuff ---*/
/*------------------------------------------------------------*/
=20
@@ -1213,18 +1190,6 @@
vg_assert(sym_name[0] !=3D 0);
name =3D ML_(addStr) ( si, sym_name, -1 );
vg_assert(name !=3D NULL);
-
- /*
- * Is this symbol a magic valgrind-intercept symbol? If so,
- * hand this off to the redir module. =20
- *
- * Note: this function can change the symbol name just added to
- * the string table. Importantly, it never makes it bigger.
- */
- if (do_intercepts) {
- VG_(maybe_redir_or_notify)( name, sym_addr );
- }
-
risym.addr =3D sym_addr;
risym.size =3D sym->st_size;
risym.name =3D name;
@@ -1775,6 +1740,24 @@
return si;
}
=20
+static void freeSegInfo ( SegInfo* si )
+{
+ struct strchunk *chunk, *next;
+ vg_assert(si !=3D NULL);
+ if (si->filename) VG_(arena_free)(VG_AR_SYMTAB, si->filename);
+ if (si->symtab) VG_(arena_free)(VG_AR_SYMTAB, si->symtab);
+ if (si->loctab) VG_(arena_free)(VG_AR_SYMTAB, si->loctab);
+ if (si->scopetab) VG_(arena_free)(VG_AR_SYMTAB, si->scopetab);
+ if (si->cfisi) VG_(arena_free)(VG_AR_SYMTAB, si->cfisi);
+
+ for(chunk =3D si->strchunks; chunk !=3D NULL; chunk =3D next) {
+ next =3D chunk->next;
+ VG_(arena_free)(VG_AR_SYMTAB, chunk);
+ }
+ VG_(arena_free)(VG_AR_SYMTAB, si);
+}
+
+
SegInfo *VG_(read_seg_symbols) ( Addr seg_addr, SizeT seg_len,
OffT seg_offset, const Char* seg_filena=
me)
{
@@ -1797,8 +1780,8 @@
canonicaliseScopetab ( si );
canonicaliseCfiSI ( si );
=20
- /* do redirects */
- VG_(resolve_existing_redirs_with_seginfo)( si );
+ /* notify m_redir about it */
+ VG_(redir_notify_new_SegInfo)( si );
}
VGP_POPCC(VgpReadSyms);
=20
@@ -1827,6 +1810,7 @@
curr->filename ? curr->filename : (Char *)"???"=
);
vg_assert(*prev_next_ptr =3D=3D curr);
*prev_next_ptr =3D curr->next;
+ VG_(redir_notify_delete_SegInfo)( curr );
freeSegInfo(curr);
return;
}
@@ -1871,35 +1855,6 @@
}
=20
=20
-/* SLOW (Linear search). Try and map a symbol name to an address.
- Since this is searching in the direction opposite to which the
- table is designed we have no option but to do a complete linear
- scan of the table. Returns NULL if not found. */
-
-static Bool hacky_match ( Char* patt, Char* in_symtab )
-{
- Int plen =3D VG_(strlen)(patt);
- Char* p =3D VG_(strstr)(in_symtab, patt);
- if (p =3D=3D NULL) return False;
- if (p[plen] =3D=3D 0 || p[plen] =3D=3D '@') return True;
- return False;
-}
-
-Addr VG_(reverse_search_one_symtab) ( const SegInfo* si, const Char* nam=
e )
-{
- UInt i;
- for (i =3D 0; i < si->symtab_used; i++) {
- if (0)=20
- VG_(printf)("%p %s\n", si->symtab[i].addr, si->symtab[i].name)=
;
- // if (0 =3D=3D VG_(strcmp)(name, si->symtab[i].name))
- // return si->symtab[i].addr;
- if (hacky_match(name, si->symtab[i].name))
- return si->symtab[i].addr;
- }
- return (Addr)NULL;
-}
-
-
/* Search all symtabs that we know about to locate ptr. If found, set
*psi to the relevant SegInfo, and *symno to the symtab entry number
within that. If not found, *psi is set to NULL. */
@@ -2751,13 +2706,16 @@
=20
for(si =3D segInfo_list; si !=3D NULL; si =3D si->next) {
if (a >=3D si->start && a < (si->start + si->size)) {
+
if (0)
- VG_(printf)("addr=3D%p si=3D%p %s got=3D%p %d plt=3D%p %d data=3D%=
p %d bss=3D%p %d\n",
- a, si, si->filename,=20
- si->got_start, si->got_size,
- si->plt_start, si->plt_size,
- si->data_start, si->data_size,
- si->bss_start, si->bss_size);
+ VG_(printf)(
+ "addr=3D%p si=3D%p %s got=3D%p %d plt=3D%p %d data=3D%p =
%d bss=3D%p %d\n",
+ a, si, si->filename,=20
+ si->got_start, si->got_size,
+ si->plt_start, si->plt_size,
+ si->data_start, si->data_size,
+ si->bss_start, si->bss_size);
+
ret =3D Vg_SectText;
=20
if (a >=3D si->data_start && a < (si->data_start + si->data_size))
@@ -2774,6 +2732,24 @@
return ret;
}
=20
+Int VG_(seginfo_syms_howmany) ( const SegInfo *si )
+{
+ return si->symtab_used;
+}
+
+void VG_(seginfo_syms_getidx) ( const SegInfo *si,=20
+ Int idx,
+ /*OUT*/Addr* addr,
+ /*OUT*/UInt* size,
+ /*OUT*/HChar** name )
+{
+ vg_assert(idx >=3D 0 && idx < si->symtab_used);
+ if (addr) *addr =3D si->symtab[idx].addr;
+ if (size) *size =3D si->symtab[idx].size;
+ if (name) *name =3D (HChar*)si->symtab[idx].name;
+}
+
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
Modified: branches/FNWRAP/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_main.c 2005-12-04 23:27:14 UTC (rev 5283)
+++ branches/FNWRAP/coregrind/m_main.c 2005-12-05 14:26:59 UTC (rev 5284)
@@ -2314,7 +2314,7 @@
// p: aspacem [so can change ownership of sysinfo pages]
//--------------------------------------------------------------
VG_(debugLog)(1, "main", "Initialise redirects\n");
- VG_(setup_code_redirect_table)();
+ VG_(redir_initialise)();
=20
//--------------------------------------------------------------
// Allow GDB attach
@@ -2690,13 +2690,13 @@
*/
static void final_tidyup(ThreadId tid)
{
- Addr __libc_freeres_wrapper;
+ Addr __libc_freeres_wrapper =3D VG_(client___libc_freeres_wrapper);
=20
vg_assert(VG_(is_running_thread)(tid));
=20
if ( !VG_(needs).libc_freeres ||
!VG_(clo_run_libc_freeres) ||
- 0 =3D=3D (__libc_freeres_wrapper =3D VG_(get_libc_freeres_wrappe=
r)()) )
+ 0 =3D=3D __libc_freeres_wrapper )
return; /* can't/won't do it */
=20
if (VG_(clo_verbosity) > 2 ||
@@ -2705,7 +2705,7 @@
VG_(message)(Vg_DebugMsg,=20
"Caught __NR_exit; running __libc_freeres()");
=20
- /* point thread context to point to libc_freeres_wrapper */
+ /* set thread context to point to libc_freeres_wrapper */
VG_(set_IP)(tid, __libc_freeres_wrapper);
// XXX should we use a special stack?
=20
Modified: branches/FNWRAP/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_mallocfree.c 2005-12-04 23:27:14 UTC (rev=
5283)
+++ branches/FNWRAP/coregrind/m_mallocfree.c 2005-12-05 14:26:59 UTC (rev=
5284)
@@ -1058,9 +1058,8 @@
=20
b =3D get_payload_block(a, ptr);
=20
-# ifdef DEBUG_MALLOC
- vg_assert(blockSane(a, b));
-# endif
+if (aid !=3D VG_AR_CLIENT)
+vg_assert(blockSane(a, b));
=20
b_bszB =3D get_bszB(b);
b_pszB =3D bszB_to_pszB(a, b_bszB);
@@ -1070,6 +1069,9 @@
=20
a->bytes_on_loan -=3D b_pszB;
=20
+if (aid !=3D VG_AR_CLIENT)
+VG_(memset)(ptr, 0xDD, (SizeT)b_pszB);
+
// Put this chunk back on a list somewhere.
b_listno =3D pszB_to_listNo(b_pszB);
mkFreeBlock( a, b, b_bszB, b_listno );
Modified: branches/FNWRAP/coregrind/m_redir.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_redir.c 2005-12-04 23:27:14 UTC (rev 5283=
)
+++ branches/FNWRAP/coregrind/m_redir.c 2005-12-05 14:26:59 UTC (rev 5284=
)
@@ -43,6 +43,7 @@
#include "pub_core_trampoline.h"
#include "pub_core_transtab.h"
#include "pub_core_tooliface.h" // VG_(needs).malloc_replacement
+#include "pub_core_aspacemgr.h" // VG_(am_find_nsegment)
=20
/*------------------------------------------------------------*/
/*--- Semantics ---*/
@@ -154,6 +155,11 @@
#define TRACE_REDIR(format, args...) \
if (VG_(clo_trace_redir)) { VG_(message)(Vg_DebugMsg, format, ## args=
); }
=20
+static void* symtab_alloc(SizeT);
+static void symtab_free(void*);
+static HChar* symtab_strdup(HChar*);
+static Bool is_plausible_guest_addr(Addr);
+
/*------------------------------------------------------------*/
/*--- REDIRECTION SPECIFICATIONS ---*/
/*------------------------------------------------------------*/
@@ -219,6 +225,16 @@
/*--- NOTIFICATIONS ---*/
/*------------------------------------------------------------*/
=20
+static=20
+void generate_and_add_actives (=20
+ /* spec list and the owning TopSpec */
+ Spec* specs,=20
+ TopSpec* parent_spec,
+ /* seginfo and the owning TopSpec */
+ SegInfo* si,
+ TopSpec* parent_sym=20
+ );
+
/* Notify m_redir of the arrival of a new SegInfo. This is fairly
complex, but the net effect is to (1) add a new entry to the
topspecs list, and (2) figure out what new binding are now active,
@@ -228,9 +244,13 @@
=20
void VG_(redir_notify_new_SegInfo)( SegInfo* newsi )
{
- TopSpec* ts, newts;
+ Bool ok;
+ Int i, nsyms;
+ Spec* specList;
+ Spec* spec;
+ TopSpec* ts;
+ TopSpec* newts;
HChar* sym_name;
- UInt sym_size;
Addr sym_addr;
HChar demangled_sopatt[N_DEMANGLED];
HChar demangled_fnpatt[N_DEMANGLED];
@@ -295,16 +315,19 @@
/* Case (1) */
for (ts =3D topSpecs; ts; ts =3D ts->next) {
if (ts->seginfo)
- generate_and_add_actives( specList,newts, ts->seginfo );
+ generate_and_add_actives( specList, newts,
+ ts->seginfo, ts );
}
=09
/* Case (2) */
for (ts =3D topSpecs; ts; ts =3D ts->next) {
- generate_and_add_actives( ts->specs,ts, newsi );
+ generate_and_add_actives( ts->specs, ts,=20
+ newsi, newts );
}
=20
/* Case (3) */
- generate_and_add_actives( specList,newts, newsi );
+ generate_and_add_actives( specList, newts,=20
+ newsi, newts );
=20
/* Finally, add the new TopSpec. */
newts->next =3D topSpecs;
@@ -320,18 +343,28 @@
would thereby arise, don't add it, but do complain. */
=20
static=20
-void generate_and_add_actives ( Spec* specs, void* parent_topspec,
- SegInfo* si )
+void generate_and_add_actives (=20
+ /* spec list and the owning TopSpec */
+ Spec* specs,=20
+ TopSpec* parent_spec,
+ /* seginfo and the owning TopSpec */
+ SegInfo* si,
+ TopSpec* parent_sym=20
+ )
{
Spec* sp;
Bool anyMark;
Active act;
+ Int nsyms, i;
+ Addr sym_addr;
+ HChar* sym_name;
=20
/* First figure out which of the specs match the seginfo's
soname. */
anyMark =3D False;
for (sp =3D specs; sp; sp =3D sp->next) {
- sp->mark =3D VG_(string_match)( sp->from_sopatt, si->soname );
+ sp->mark =3D VG_(string_match)( sp->from_sopatt,=20
+ VG_(seginfo_soname)(si) );
anyMark =3D anyMark || sp->mark;
}
=20
@@ -351,8 +384,8 @@
/* got a new binding. Add to collection. */
act.from_addr =3D sym_addr;
act.to_addr =3D sp->to_addr;
- act.parent_spec =3D parent_topspec;
- act.parent_sym =3D si;
+ act.parent_spec =3D parent_spec;
+ act.parent_sym =3D parent_sym;
maybe_add_active( act );
}
}
@@ -362,7 +395,7 @@
=20
/* Add an act (passed by value; is copied here) and deal with
conflicting bindings. */
-static void add_to_active ( Active act )
+static void maybe_add_active ( Active act )
{
Active* old =3D VG_(OSet_Lookup)( activeSet, &act.from_addr );
if (old) {
@@ -378,7 +411,7 @@
/* COMPLAIN if new and old parents differ */
}
} else {
- Active* a =3D VG_(OSet_AllocNode)(active, sizeof(Active));
+ Active* a =3D VG_(OSet_AllocNode)(activeSet, sizeof(Active));
vg_assert(a);
*a =3D act;
VG_(OSet_Insert)(activeSet, a);
@@ -394,6 +427,9 @@
{
TopSpec* ts;
OSet* tmpSet;
+ Active* act;
+ Bool delMe;
+ Addr* addrP;
=20
vg_assert(delsi);
=20
@@ -406,8 +442,8 @@
=20
/* Traverse the actives, copying the addresses of those we intend
to delete into tmpSet. */
- tmpSet =3D VG_(OSet_Create, 0/*keyOff*/, NULL/*fastCmp*/,
- symtab_alloc, symtab_free);
+ tmpSet =3D VG_(OSet_Create)( 0/*keyOff*/, NULL/*fastCmp*/,
+ symtab_alloc, symtab_free);
=20
ts->mark =3D True;
=20
@@ -429,45 +465,101 @@
activeSet. */
VG_(OSet_ResetIter)( tmpSet );
while ( (addrP =3D VG_(OSet_Next)(tmpSet)) ) {
- VG_(OSet_Remove)( activeSet, *addrP );
- VG_(OSet_FreeNode)( activeSet, *addrP );
+ VG_(OSet_Remove)( activeSet, addrP );
+ VG_(OSet_FreeNode)( activeSet, addrP );
}
=20
VG_(OSet_Destroy)( tmpSet );
}
=20
=20
-//////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////
+/*------------------------------------------------------------*/
+/*--- QUERIES (really the whole point of this module) ---*/
+/*------------------------------------------------------------*/
=20
-static void* symtab_alloc(SizeT n)
+/* This is the crucial redirection function. It answers the question:
+ should this code address be redirected somewhere else? It's used
+ just before translating a basic block. */
+Addr VG_(redir_do_lookup) ( Addr orig )
{
- return VG_(arena_malloc)(VG_AR_SYMTAB, n);
+ Spec* r =3D VG_(OSet_Lookup)(activeSet, &orig);
+ if (r =3D=3D NULL)
+ return orig;
+
+ vg_assert(r->to_addr !=3D 0);
+ return r->to_addr;
}
=20
-static void symtab_free(void* p)
+
+/*------------------------------------------------------------*/
+/*--- INITIALISATION ---*/
+/*------------------------------------------------------------*/
+
+/* Add a never-delete-me Active. */
+
+__attribute__((unused)) /* only used on amd64 */
+static void add_hardwired_active ( Addr from, Addr to )
{
- return VG_(arena_free)(VG_AR_SYMTAB, p);
+ Active act;
+ act.from_addr =3D from;
+ act.to_addr =3D to;
+ act.parent_spec =3D NULL;
+ act.parent_sym =3D NULL;
+ maybe_add_active( act );
}
=20
+
+/* Add a never-delete-me Spec. This is a bit of a kludge. On the
+ assumption that this is called only at startup, only handle the
+ case where topSpecs is completely empty, or if it isn't, it has
+ just one entry and that is the one with NULL seginfo -- that is the
+ entry that holds these initial specs. */
+
+__attribute__((unused)) /* not used on all platforms */
+static void add_hardwired_spec ( HChar* sopatt, HChar* fnpatt, Addr to_a=
ddr )
+{
+ Spec* spec =3D symtab_alloc(sizeof(Spec));
+ vg_assert(spec);
+
+ if (topSpecs =3D=3D NULL) {
+ topSpecs =3D symtab_alloc(sizeof(TopSpec));
+ vg_assert(topSpecs);
+ topSpecs->next =3D NULL;
+ topSpecs->seginfo =3D NULL;
+ topSpecs->specs =3D NULL;
+ topSpecs->mark =3D False;
+ }
+
+ vg_assert(topSpecs !=3D NULL);
+ vg_assert(topSpecs->next =3D=3D NULL);
+ vg_assert(topSpecs->seginfo =3D=3D NULL);
+
+ spec->from_sopatt =3D sopatt;
+ spec->from_fnpatt =3D fnpatt;
+ spec->to_addr =3D to_addr;
+ spec->mark =3D False; /* not significant */
+
+ spec->next =3D topSpecs->specs;
+ topSpecs->specs =3D spec;
+}
+
+
/* Initialise the redir system, and create the initial Spec list and
for amd64-linux a couple of permanent active mappings. The initial
Specs are not converted into Actives yet, on the (checked)
assumption that no SegInfos have so far been created, and so when
they are created, that will happen. */
=20
-void VG_(redir_init) ( void )
+void VG_(redir_initialise) ( void )
{
+ // Assert that there are no SegInfos so far
vg_assert( VG_(next_seginfo)(NULL) =3D=3D NULL );
=20
- // Initialise spec list.
- specs =3D NULL;
-
// Initialise active mapping.
- active =3D VG_(OSet_Create)(offsetof(Active, from_addr),
- NULL, // Use fast comparison
- symtab_alloc,
- symtab_free);
+ activeSet =3D VG_(OSet_Create)(offsetof(Active, from_addr),
+ NULL, // Use fast comparison
+ symtab_alloc,
+ symtab_free);
=20
// The rest of this function just adds initial Specs. =20
=20
@@ -475,30 +567,26 @@
/* Redirect _dl_sysinfo_int80, which is glibc's default system call
routine, to our copy so that the special sysinfo unwind hack in
m_stacktrace.c will kick in. */
- add_to_specs(
- Spec{NULL,=20
- "soname:ld-linux.so.2", "_dl_sysinfo_int80",
- (Addr)&VG_(x86_linux_REDIR_FOR__dl_sysinfo_int80),
- NULL}
+ add_hardwired_spec(
+ "ld-linux.so.2", "_dl_sysinfo_int80",
+ (Addr)&VG_(x86_linux_REDIR_FOR__dl_sysinfo_int80)=20
);
/* If we're using memcheck, use this intercept right from the
start, otherwise ld.so (glibc-2.3.5) makes a lot of noise. */
if (0=3D=3DVG_(strcmp)("Memcheck", VG_(details).name)) {
- add_to_specs(
- Spec{NULL,
- "soname:ld-linux.so.2", "index",
- (Addr)&VG_(x86_linux_REDIR_FOR_index),
- NULL}
+ add_hardwired_spec(
+ "ld-linux.so.2", "index",
+ (Addr)&VG_(x86_linux_REDIR_FOR_index)
);
}
=20
# elif defined(VGP_amd64_linux)
/* Redirect vsyscalls to local versions */
- add_to_actives(
+ add_hardwired_active(
0xFFFFFFFFFF600000ULL,
(Addr)&VG_(amd64_linux_REDIR_FOR_vgettimeofday)=20
);
- add_to_actives(=20
+ add_hardwired_active(=20
0xFFFFFFFFFF600400ULL,
(Addr)&VG_(amd64_linux_REDIR_FOR_vtime)=20
);
@@ -507,20 +595,14 @@
/* If we're using memcheck, use these intercepts right from
the start, otherwise ld.so makes a lot of noise. */
if (0=3D=3DVG_(strcmp)("Memcheck", VG_(details).name)) {
-
- add_to_specs(
- Spec{NULL,
- "soname:ld.so.1", "strlen",
- (Addr)&VG_(ppc32_linux_REDIR_FOR_strlen),
- NULL}
+ add_hardwired_spec(
+ "ld.so.1", "strlen",
+ (Addr)&VG_(ppc32_linux_REDIR_FOR_strlen),
); =20
- add_to_specs(
- Spec{NULL,
- "soname:ld.so.1", "strcmp",
- (Addr)&VG_(ppc32_linux_REDIR_FOR_strcmp),
- NULL}
+ add_hardwired_spec(
+ "soname:ld.so.1", "strcmp",
+ (Addr)&VG_(ppc32_linux_REDIR_FOR_strcmp),
);
-
}
=20
# elif defined(VGP_ppc64_linux)
@@ -535,199 +617,6 @@
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
=20
-static Bool soname_matches(const Char *pattern, const Char* soname)
-{
- // pattern must start with "soname:"
- vg_assert(NULL !=3D pattern);
- vg_assert(0 =3D=3D VG_(strncmp)(pattern, "soname:", 7));
-
- if (NULL =3D=3D soname)
- return False;
- =20
- return VG_(string_match)(pattern + 7, soname);
-}
-
-// Prepends redir to the unresolved list.
-static void add_redir_to_unresolved_list(Spec *redir)
-{
- redir->next =3D specs;
- specs =3D redir;
-}
-
-static void add_redir_to_resolved_list(Spec *redir, Bool need_discard)
-{
- vg_assert(redir->from_addr);
-
- TRACE_REDIR(" redir resolved (%s:%s=3D%p -> %p)",=20
- redir->from_lib, redir->from_sym, redir->from_addr,
- redir->to_addr);
-
- vg_assert(redir->to_addr !=3D 0);
-
- if (need_discard) {
- /* For some given (from, to) redir, the "from" function got
- loaded before the .so containing "to" became available so
- we need to discard any existing translations involving
- the "from" function.
-
- Note, we only really need to discard the first bb of the
- old entry point, and so we avoid the problem of having to
- figure out how big that bb was -- since it is at least 1
- byte of original code, we can just pass 1 as the original
- size to invalidate_translations() and it will indeed get
- rid of the translation.=20
-
- Note, this is potentially expensive -- discarding
- translations requires a complete search through all of
- them.
- */
- TRACE_REDIR("Discarding translation due to redirect of already =
loaded function" );
- TRACE_REDIR(" %s:%s(%p) -> %p)", redir->from_lib, redir->from=
_sym,
- redir->from_addr, redir->to_=
addr );
- VG_(discard_translations)((Addr64)redir->from_addr, 1,=20
- "add_redir_to_resolved_list");
- }
-
- // This entails a possible double OSet lookup -- one for Contains(=
),
- // one for Insert(). If we had OSet_InsertIfNonDup() we could do =
it
- // with one lookup.
- if ( ! VG_(OSet_Contains)(active, &redir->from_addr) ) {
- VG_(OSet_Insert)(active, redir);
- } else {
- TRACE_REDIR(" redir %s:%s:%p->%p duplicated\n",
- redir->from_lib, redir->from_sym, redir->from_addr,
- redir->to_addr);
- // jrs 20 Nov 05: causes this: m_mallocfree.c:170
- // (mk_plain_bszB): Assertion 'bszB !=3D 0' failed.
- // Perhaps it is an invalid free? Disable for now
- // XXX leak?
- //VG_(arena_free)(VG_AR_SYMTAB, redir);
- }
-}
-
-// Resolve a redir using si if possible. Returns True if it succeeded.
-static Bool resolve_redir_with_seginfo(Spec *redir, const SegInfo *si)
-{
- Bool ok;
-
- vg_assert(si !=3D NULL);
- vg_assert(redir->from_addr =3D=3D 0 );
- vg_assert(redir->from_sym !=3D NULL);
-
- // Resolved if the soname matches and we find the symbol.
- ok =3D soname_matches(redir->from_lib, VG_(seginfo_soname)(si));
- if (ok) {
- redir->from_addr =3D VG_(reverse_search_one_symtab)(si, redir->fro=
m_sym);
- ok =3D ( redir->from_addr =3D=3D 0 ? False : True );
- }
- return ok; =20
-}
-
-// Resolve a redir using any SegInfo if possible. This is called whenev=
er
-// a new sym-to-addr redir is created. It covers the case where a
-// replacement function is loaded after its replacee.
-static Bool resolve_redir_with_existing_seginfos(Spec *redir)
-{
- const SegInfo *si;
-
- for (si =3D VG_(next_seginfo)(NULL);=20
- si !=3D NULL;=20
- si =3D VG_(next_seginfo)(si))
- {
- if (resolve_redir_with_seginfo(redir, si))
- return True;
- }
- return False;
-}
-
-// Resolve as many unresolved redirs as possible with this SegInfo. Thi=
s
-// should be called when a new SegInfo symtab is loaded. It covers the =
case
-// where a replacee function is loaded after its replacement function.
-void VG_(resolve_existing_redirs_with_seginfo)(SegInfo *si)
-{
- Spec **prevp =3D &specs;
- Spec *redir, *next;
-
- TRACE_REDIR("Just loaded %s (soname=3D%s),",
- VG_(seginfo_filename)(si), VG_(seginfo_soname)(si));
- TRACE_REDIR(" resolving any unresolved redirs with it");
-
- // Visit each unresolved redir - if it becomes resolved, then
- // move it from the unresolved list to the resolved list.
- for (redir =3D specs; redir !=3D NULL; redir =3D next) {
- next =3D redir->next;
-
- if (resolve_redir_with_seginfo(redir, si)) {
- *prevp =3D next;
- redir->next =3D NULL;
- add_redir_to_resolved_list(redir, False);
- } else
- prevp =3D &redir->next;
- }
-
- TRACE_REDIR(" Finished resolving");
-}
-
-/* Redirect a function at from_addr to a function at to_addr */
-__attribute__((unused)) // It is used, but not on all platforms...
-static void add_redirect_addr_to_addr( Addr from_addr, Addr to_addr )
-{
- Spec* redir =3D VG_(OSet_AllocNode)(active,
- sizeof(Spec));
- vg_assert(0 !=3D from_addr && 0 !=3D to_addr);
-
- redir->from_lib =3D NULL;
- redir->from_sym =3D NULL;
- redir->from_addr =3D from_addr;
-
- redir->to_addr =3D to_addr;
-
- TRACE_REDIR("REDIRECT addr to addr: %p to %p", from_addr, to_addr);
-
- // This redirection is already resolved, put it straight in the list.
- add_redir_to_resolved_list(redir, True);
-}
-
-/* Redirect a lib/symbol reference to a function at addr */
-static void add_redirect_sym_to_addr(
- const Char *from_lib, const Char *from_sym, Addr to_addr
-)
-{
- Spec* redir =3D VG_(OSet_AllocNode)(active,
- sizeof(Spec));
- vg_assert(from_lib && from_sym && 0 !=3D to_addr);
-
- redir->from_lib =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_lib);
- redir->from_sym =3D VG_(arena_strdup)(VG_AR_SYMTAB, from_sym);
- redir->from_addr =3D 0;
- redir->to_addr =3D to_addr;
-
- TRACE_REDIR("REDIR sym to addr: %s:%s to %p", from_lib, from_sym, to_=
addr);
-
- // Check against all existing segments to see if this redirection
- // can be resolved immediately (as will be the case when the replacem=
ent
- // function is loaded after the replacee). Then add it to the
- // appropriate list.
- if (resolve_redir_with_existing_seginfos(redir)) {
- add_redir_to_resolved_list(redir, True);
- } else {
- add_redir_to_unresolved_list(redir);
- }
-}
-
-/* If address 'a' is being redirected, return the redirected-to
- address. */
-Addr VG_(code_redirect)(Addr a)
-{
- Spec* r =3D VG_(OSet_Lookup)(active, &a);
- if (r =3D=3D NULL)
- return a;
-
- vg_assert(r->to_addr !=3D 0);
-
- return r->to_addr;
-}
-
static void* symtab_alloc(SizeT n)
{
return VG_(arena_malloc)(VG_AR_SYMTAB, n);
@@ -738,182 +627,57 @@
return VG_(arena_free)(VG_AR_SYMTAB, p);
}
=20
-void VG_(setup_code_redirect_table) ( void )
+static HChar* symtab_strdup(HChar* str)
{
- // Initialise active list.
- active =3D VG_(OSet_Create)(offsetof(Spec, from_addr),
- NULL, // Use fast comparison
- symtab_alloc,
-} symtab_free));
-
-
-/* Z-decode a symbol into library:func form, eg=20
- =20
- _vgi_libcZdsoZd6__ZdlPv --> libc.so.6:_ZdlPv
-
- Uses the Z-encoding scheme described in pub_core_redir.h.
- Returns True if demangle OK, False otherwise.
-*/
-static Bool Z_decode(const Char* symbol, Char* result, Int nbytes)
-{
-# define EMIT(ch) \
- do { \
- if (j >=3D nbytes) \
- result[j-1] =3D 0; \
- else \
- result[j++] =3D ch; \
- } while (0)
-
- Bool error =3D False;
- Int i, j =3D 0;
- Int len =3D VG_(strlen)(symbol);
- if (0) VG_(printf)("idm: %s\n", symbol);
-
- i =3D VG_REPLACE_FUNCTION_PREFIX_LEN;
-
- /* Chew though the Z-encoded soname part. */
- while (True) {
-
- if (i >=3D len)=20
- break;
-
- if (symbol[i] =3D=3D '_')
- /* We found the underscore following the Z-encoded soname.
- Just copy the rest literally. */
- break;
-
- if (symbol[i] !=3D 'Z') {
- EMIT(symbol[i]);
- i++;
- continue;
- }
-
- /* We've got a Z-escape. Act accordingly. */
- i++;
- if (i >=3D len) {
- /* Hmm, Z right at the end. Something's wrong. */
- error =3D True;
- EMIT('Z');
- break;
- }
- switch (symbol[i]) {
- case 'a': EMIT('*'); break;
- case 'p': EMIT('+'); break;
- case 'c': EMIT(':'); break;
- case 'd': EMIT('.'); break;
- case 'u': EMIT('_'); break;
- case 'h': EMIT('-'); break;
- case 's': EMIT(' '); break;
- case 'Z': EMIT('Z'); break;
- default: error =3D True; EMIT('Z'); EMIT(symbol[i]); break;
- }
- i++;
- }
-
- if (error || i >=3D len || symbol[i] !=3D '_') {
- /* Something's wrong. Give up. */
- VG_(message)(Vg_UserMsg, "intercept: error demangling: %s", symbol=
);
- EMIT(0);
- return False;
- }
-
- /* Copy the rest of the string verbatim. */
- i++;
- EMIT(':');
- while (True) {
- if (i >=3D len)
- break;
- EMIT(symbol[i]);
- i++;
- }
-
- EMIT(0);
- if (0) VG_(printf)("%s\n", result);
- return True;
-
-# undef EMIT
+ return VG_(arena_strdup)(VG_AR_SYMTAB, str);
}
=20
-// Nb: this can change the string pointed to by 'symbol'.
-static void handle_replacement_function( Char* symbol, Addr addr )
+/* Really this should be merged with translations_allowable_from_seg
+ in m_translate. */
+static Bool is_plausible_guest_addr(Addr a)
{
- Bool ok;
- Int len =3D VG_(strlen)(symbol) + 1 - VG_REPLACE_FUNCTION_PREFIX_LE=
N;
- Char *lib =3D VG_(arena_malloc)(VG_AR_SYMTAB, len+8);
- Char *func;
-
- // Put "soname:" at the start of lib
- VG_(strcpy)(lib, "soname:");
-
- ok =3D Z_decode(symbol, lib+7, len);
- if (ok) {
- // lib is "soname:<libname>:<fnname>". Split the string at the 2n=
d ':'.
- func =3D lib + VG_(strlen)(lib)-1;
- while(*func !=3D ':') func--;
- *func =3D '\0';
- func++; // Move past the '\0'
-
- // Now lib is "soname:<libname>" and func is "<fnname>".
- if (0) VG_(printf)("lib A%sZ, func A%sZ\n", lib, func);
- add_redirect_sym_to_addr(lib, func, addr);
-
- // Overwrite the given Z-encoded name with just the fnname.
- VG_(strcpy)(symbol, func);
- }
-
- VG_(arena_free)(VG_AR_SYMTAB, lib);
+ NSegment* seg =3D VG_(am_find_nsegment)(a);
+ return seg !=3D NULL
+ && (seg->kind =3D=3D SkAnonC || seg->kind =3D=3D SkFileC)
+ && (seg->hasX || seg->hasR); /* crude x86-specific hack */
}
=20
-static Addr __libc_freeres_wrapper =3D 0;
+//////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////
=20
-Addr VG_(get_libc_freeres_wrapper)(void)
-{
- return __libc_freeres_wrapper;
-}
=20
// This is specifically for stringifying VG_(x) function names. We
// need to do two macroexpansions to get the VG_ macro expanded before
// stringifying.
-#define _STR(x) #x
-#define STR(x) _STR(x)
-
-static void handle_load_notifier( Char* symbol, Addr addr )
-{
- if (VG_(strcmp)(symbol, STR(VG_NOTIFY_ON_LOAD(freeres))) =3D=3D 0)
- __libc_freeres_wrapper =3D addr;
+//zz #define _STR(x) #x
+//zz #define STR(x) _STR(x)
+//zz=20
+//zz static void handle_load_notifier( Char* symbol, Addr addr )
+//zz {
+//zz if (VG_(strcmp)(symbol, STR(VG_NOTIFY_ON_LOAD(freeres))) =3D=3D =
0)
+//zz VG_(client___libc_freeres_wrapper) =3D addr;
// else
// if (VG_(strcmp)(symbol, STR(VG_WRAPPER(pthread_startfunc_wrapper))) =3D=
=3D 0)
// VG_(pthread_startfunc_wrapper)((Addr)(si->offset + sym->st_value))=
;
- else
- vg_assert2(0, "unrecognised load notification function: %s", symbo=
l);
-}
+//zz else
+//zz vg_assert2(0, "unrecognised load notification function: %s", =
symbol);
+//zz }
+//zz=20
+//zz static Bool is_replacement_function(Char* s)
+//zz {
+//zz return (0 =3D=3D VG_(strncmp)(s,
+//zz VG_REPLACE_FUNCTION_PREFIX,
+//zz VG_REPLACE_FUNCTION_PREFIX_LEN));
+//zz }
+//zz=20
+//zz static Bool is_load_notifier(Char* s)
+//zz {
+//zz return (0 =3D=3D VG_(strncmp)(s,
+//zz VG_NOTIFY_ON_LOAD_PREFIX,
+//zz VG_NOTIFY_ON_LOAD_PREFIX_LEN));
+//zz }
=20
-static Bool is_replacement_function(Char* s)
-{
- return (0 =3D=3D VG_(strncmp)(s,
- VG_REPLACE_FUNCTION_PREFIX,
- VG_REPLACE_FUNCTION_PREFIX_LEN));
-}
=20
-static Bool is_load_notifier(Char* s)
-{
- return (0 =3D=3D VG_(strncmp)(s,
- VG_NOTIFY_ON_LOAD_PREFIX,
- VG_NOTIFY_ON_LOAD_PREFIX_LEN));
-}
-
-// Call this for each symbol loaded. It determines if we need to do
-// anything special with it. It can modify 'symbol' in-place.
-void VG_(maybe_redir_or_notify) ( Char* symbol, Addr addr )
-{
- if (is_replacement_function(symbol))
- handle_replacement_function(symbol, addr);
- else=20
- if (is_load_notifier(symbol))
- handle_load_notifier(symbol, addr);
-}
-
-
/*------------------------------------------------------------*/
/*--- THE DEMANGLER ---*/
/*------------------------------------------------------------*/
@@ -945,8 +709,11 @@
} \
} while (0)
=20
- vg_assert(solen > 0);
- vg_assert(fnlen > 0);
+ Bool error, oflow, valid, fn_is_encoded;
+ Int soi, fni, i;
+
+ vg_assert(soLen > 0);
+ vg_assert(fnLen > 0);
error =3D False;
oflow =3D False;
soi =3D 0;
@@ -985,7 +752,7 @@
=20
/* We've got a Z-escape. */
i++;
- switch (symbol[i]) {
+ switch (sym[i]) {
case 'a': EMITSO('*'); break;
case 'p': EMITSO('+'); break;
case 'c': EMITSO(':'); break;
@@ -994,6 +761,7 @@
case 'h': EMITSO('-'); break;
case 's': EMITSO(' '); break;
case 'Z': EMITSO('Z'); break;
+ case 'A': EMITSO('@'); break;
default: error =3D True; goto out;
}
i++;
@@ -1030,7 +798,7 @@
=20
/* We've got a Z-escape. */
i++;
- switch (symbol[i]) {
+ switch (sym[i]) {
case 'a': EMITFN('*'); break;
case 'p': EMITFN('+'); break;
case 'c': EMITFN(':'); break;
@@ -1039,6 +807,7 @@
case 'h': EMITFN('-'); break;
case 's': EMITFN(' '); break;
case 'Z': EMITFN('Z'); break;
+ case 'A': EMITFN('@'); break;
default: error =3D True; goto out;
}
i++;
@@ -1050,12 +819,12 @@
=20
if (error) {
/* Something's wrong. Give up. */
- VG_(message)(Vg_UserMsg, "m_redir: error demangling: %s", symbol);
+ VG_(message)(Vg_UserMsg, "m_redir: error demangling: %s", sym);
return False;
}
if (oflow) {
/* It didn't fit. Give up. */
- VG_(message)(Vg_UserMsg, "m_debuginfo: oflow demangling: %s", symb=
ol);
+ VG_(message)(Vg_UserMsg, "m_debuginfo: oflow demangling: %s", sym)=
;
return False;
}
=20
Modified: branches/FNWRAP/coregrind/m_replacemalloc/vg_replace_malloc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_replacemalloc/vg_replace_malloc.c 2005-12=
-04 23:27:14 UTC (rev 5283)
+++ branches/FNWRAP/coregrind/m_replacemalloc/vg_replace_malloc.c 2005-12=
-05 14:26:59 UTC (rev 5284)
@@ -50,7 +50,7 @@
#include "pub_core_basics.h"
#include "pub_core_debuginfo.h" // needed for pub_core_redir.h :(
#include "pub_core_mallocfree.h" // for VG_MIN_MALLOC_SZB, VG_AR_CLIE=
NT
-#include "pub_core_redir.h" // for VG_REPLACE_FUNCTION
+#include "pub_core_redir.h" // for VG_REDIRECT_FUNCTION_*
#include "pub_core_replacemalloc.h"
=20
/* Some handy Z-encoded names */
@@ -91,10 +91,11 @@
__builtin_delete, calloc, realloc, memalign, and friends.
=20
None of these functions are called directly - they are not meant to
- be found by the dynamic linker. But ALL client calls to malloc() and
- friends wind up here eventually. They get called because vg_replace_=
malloc
- installs a bunch of code redirects which causes Valgrind to use these
- functions rather than the ones they're replacing.
+ be found by the dynamic linker. But ALL client calls to malloc()
+ and friends wind up here eventually. They get called because
+ vg_replace_malloc installs a bunch of code redirects which causes
+ Valgrind to use these functions rather than the ones they're
+ replacing.
*/
=20
/* Generate a replacement for 'fnname' in object 'soname', which calls
@@ -102,8 +103,8 @@
*/
#define ALLOC_or_NULL(soname, fnname, vg_replacement) \
\
- void* VG_REPLACE_FUNCTION(soname,fnname) (SizeT n); \
- void* VG_REPLACE_FUNCTION(soname,fnname) (SizeT n) \
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) (SizeT n); \
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) (SizeT n) \
{ \
void* v; \
\
@@ -122,8 +123,8 @@
*/
#define ALLOC_or_BOMB(soname, fnname, vg_replacement) \
\
- void* VG_REPLACE_FUNCTION(soname,fnname) (SizeT n); \
- void* VG_REPLACE_FUNCTION(soname,fnname) (SizeT n) \
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) (SizeT n); \
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) (SizeT n) \
{ \
void* v; \
\
@@ -220,8 +221,8 @@
*/
#define FREE(soname, fnname, vg_replacement) \
\
- void VG_REPLACE_FUNCTION(soname,fnname) (void *p); \
- void VG_REPLACE_FUNCTION(soname,fnname) (void *p) \
+ void VG_REDIRECT_FUNCTION_ZU(soname,fnname) (void *p); \
+ void VG_REDIRECT_FUNCTION_ZU(soname,fnname) (void *p) \
{ \
MALLOC_TRACE(#vg_replacement "(%p)", p ); \
if (p =3D=3D NULL) \
@@ -263,8 +264,8 @@
=20
#define CALLOC(soname, fnname) \
\
- void* VG_REPLACE_FUNCTION(soname,fnname) ( SizeT nmemb, SizeT size );=
\
- void* VG_REPLACE_FUNCTION(soname,fnname) ( SizeT nmemb, SizeT size ) =
\
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) ( SizeT nmemb, SizeT siz=
e ); \
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) ( SizeT nmemb, SizeT siz=
e ) \
{ \
void* v; \
\
@@ -281,8 +282,8 @@
=20
#define REALLOC(soname, fnname) \
\
- void* VG_REPLACE_FUNCTION(soname,fnname) ( void* ptrV, SizeT new_size=
);\
- void* VG_REPLACE_FUNCTION(soname,fnname) ( void* ptrV, SizeT new_size=
) \
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) ( void* ptrV, SizeT new_=
size );\
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) ( void* ptrV, SizeT new_=
size ) \
{ \
void* v; \
\
@@ -291,9 +292,9 @@
if (ptrV =3D=3D NULL) \
/* We need to call a malloc-like function; so let's use \
one which we know exists. */ \
- return VG_REPLACE_FUNCTION(libcZdsoZa,malloc) (new_size); \
+ return VG_REDIRECT_FUNCTION_ZU(libcZdsoZa,malloc) (new_size); \
if (new_size <=3D 0) { \
- VG_REPLACE_FUNCTION(libcZdsoZa,free)(ptrV); \
+ VG_REDIRECT_FUNCTION_ZU(libcZdsoZa,free)(ptrV); \
MALLOC_TRACE(" =3D 0"); \
return NULL; \
} \
@@ -308,8 +309,8 @@
=20
#define MEMALIGN(soname, fnname) \
\
- void* VG_REPLACE_FUNCTION(soname,fnname) ( SizeT alignment, SizeT n )=
; \
- void* VG_REPLACE_FUNCTION(soname,fnname) ( SizeT alignment, SizeT n )=
\
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) ( SizeT alignment, SizeT=
n ); \
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) ( SizeT alignment, SizeT=
n ) \
{ \
void* v; \
\
@@ -334,10 +335,10 @@
=20
#define VALLOC(soname, fnname) \
\
- void* VG_REPLACE_FUNCTION(soname,fnname) ( SizeT size ); \
- void* VG_REPLACE_FUNCTION(soname,fnname) ( SizeT size ) \
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) ( SizeT size ); \
+ void* VG_REDIRECT_FUNCTION_ZU(soname,fnname) ( SizeT size ) \
{ \
- return VG_REPLACE_FUNCTION(libcZdsoZa,memalign)(VKI_PAGE_SIZE, siz=
e); \
+ return VG_REDIRECT_FUNCTION_ZU(libcZdsoZa,memalign)(VKI_PAGE_SIZE,=
size); \
}
=20
VALLOC(m_libc_dot_so_star, valloc);
@@ -347,8 +348,8 @@
=20
#define MALLOPT(soname, fnname) \
\
- int VG_REPLACE_FUNCTION(soname, fnname) ( int cmd, int value ); \
- int VG_REPLACE_FUNCTION(soname, fnname) ( int cmd, int value ) \
+ int VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( int cmd, int value ); \
+ int VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( int cmd, int value ) \
{ \
/* In glibc-2.2.4, 1 denotes a successful return value for \
mallopt */ \
@@ -360,8 +361,10 @@
=20
#define POSIX_MEMALIGN(soname, fnname) \
\
- int VG_REPLACE_FUNCTION(soname, fnname) ( void **memptr, SizeT alignm=
ent, SizeT size ); \
- int VG_REPLACE_FUNCTION(soname, fnname) ( void **memptr, SizeT alignm=
ent, SizeT size ) \
+ int VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( void **memptr, \
+ SizeT alignment, SizeT =
size ); \
+ int VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( void **memptr, \
+ SizeT alignment, SizeT =
size ) \
{ \
void *mem; \
\
@@ -371,7 +374,7 @@
|| (alignment & (alignment - 1)) !=3D 0) \
return VKI_EINVAL; \
\
- mem =3D VG_REPLACE_FUNCTION(libcZdsoZa,memalign)(alignment, size);=
\
+ mem =3D VG_REDIRECT_FUNCTION_ZU(libcZdsoZa,memalign)(alignment, si=
ze); \
\
if (mem !=3D NULL) { \
*memptr =3D mem; \
@@ -386,8 +389,8 @@
=20
#define MALLOC_USABLE_SIZE(soname, fnname) \
\
- int VG_REPLACE_FUNCTION(soname, fnname) ( void* p ); \
- int VG_REPLACE_FUNCTION(soname, fnname) ( void* p ) \
+ int VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( void* p ); \
+ int VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( void* p ) \
{ \
SizeT pszB; \
\
@@ -417,8 +420,8 @@
=20
#define PANIC(soname, fnname) \
\
- void VG_REPLACE_FUNCTION(soname, fnname) ( void ); \
- void VG_REPLACE_FUNCTION(soname, fnname) ( void ) \
+ void VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( void ); \
+ void VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( void ) \
{ \
panic(#fnname); \
}
@@ -434,8 +437,8 @@
// doesn't know that the call to mallinfo fills in mi.
#define MALLINFO(soname, fnname) \
\
- struct vg_mallinfo VG_REPLACE_FUNCTION(soname, fnname) ( void ); \
- struct vg_mallinfo VG_REPLACE_FUNCTION(soname, fnname) ( void ) \
+ struct vg_mallinfo VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( void ); =
\
+ struct vg_mallinfo VG_REDIRECT_FUNCTION_ZU(soname, fnname) ( void ) =
\
{ \
static struct vg_mallinfo mi; \
MALLOC_TRACE("mallinfo()"); \
Modified: branches/FNWRAP/coregrind/m_translate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/m_translate.c 2005-12-04 23:27:14 UTC (rev =
5283)
+++ branches/FNWRAP/coregrind/m_translate.c 2005-12-05 14:26:59 UTC (rev =
5284)
@@ -40,12 +40,12 @@
#include "pub_core_options.h"
#include "pub_core_profile.h"
=20
-#include "pub_core_debuginfo.h" // Needed for pub_core_redir :(
-#include "pub_core_redir.h" // For VG_(code_redirect)()
+#include "pub_core_debuginfo.h" // Needed for pub_core_redir [SegInf=
o]
+#include "pub_core_redir.h" // VG_(redir_do_lookup)
=20
-#include "pub_core_signals.h" // For VG_(synth_fault_{perms,mappin=
g})()
-#include "pub_core_stacks.h" // For VG_(unknown_SP_update)()
-#include "pub_core_tooliface.h" // For VG_(tdict)
+#include "pub_core_signals.h" // VG_(synth_fault_{perms,mapping})(=
)
+#include "pub_core_stacks.h" // VG_(unknown_SP_update)()
+#include "pub_core_tooliface.h" // VG_(tdict)
#include "pub_core_translate.h"
#include "pub_core_transtab.h"
=20
@@ -426,7 +426,7 @@
}
=20
/* Destination is redirected? */
- if (addr !=3D VG_(code_redirect)(addr))
+ if (addr !=3D VG_(redir_do_lookup)(addr))
goto dontchase;
=20
/* well, ok then. go on and chase. */
@@ -476,7 +476,7 @@
/* Look in the code redirect table to see if we should
translate an alternative address for orig_addr. */
if (allow_redirection) {
- redir =3D VG_(code_redirect)(orig_addr);
+ redir =3D VG_(redir_do_lookup)(orig_addr);
did_redirect =3D redir !=3D orig_addr;
} else {
redir =3D orig_addr;
Modified: branches/FNWRAP/coregrind/pub_core_clientstate.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/pub_core_clientstate.h 2005-12-04 23:27:14 =
UTC (rev 5283)
+++ branches/FNWRAP/coregrind/pub_core_clientstate.h 2005-12-05 14:26:59 =
UTC (rev 5284)
@@ -78,6 +78,9 @@
extern Int VG_(fd_soft_limit);
extern Int VG_(fd_hard_limit);
=20
+/* Useful addresses extracted from the client */
+/* Where is the __libc_freeres_wrapper routine we made? */
+extern Addr VG_(client___libc_freeres_wrapper);
=20
#endif // __PUB_CORE_CLIENTSTATE_H
=20
Modified: branches/FNWRAP/coregrind/pub_core_debuginfo.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/pub_core_debuginfo.h 2005-12-04 23:27:14 UT=
C (rev 5283)
+++ branches/FNWRAP/coregrind/pub_core_debuginfo.h 2005-12-05 14:26:59 UT=
C (rev 5284)
@@ -58,8 +58,6 @@
=20
extern Bool VG_(get_fnname_nodemangle)( Addr a, Char* fnname, Int n_fnna=
me );
=20
-extern Addr VG_(reverse_search_one_symtab) ( const SegInfo* si, const Ch=
ar* name );
-
extern Bool VG_(use_CFI_info) ( /*MOD*/Addr* ipP,
/*MOD*/Addr* spP,
/*MOD*/Addr* fpP,
Modified: branches/FNWRAP/coregrind/pub_core_redir.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/pub_core_redir.h 2005-12-04 23:27:14 UTC (r=
ev 5283)
+++ branches/FNWRAP/coregrind/pub_core_redir.h 2005-12-05 14:26:59 UTC (r=
ev 5284)
@@ -43,35 +43,32 @@
=20
#include "pub_tool_redir.h"
=20
+
//--------------------------------------------------------------------
-// General
+// Notifications - by which we are told of state changes
//--------------------------------------------------------------------
=20
-// This module needs be told about all the symbols that get loaded, so=20
-// it can check if it needs to do anything special. This is the functio=
n
-// that does that checking. It modifies 'symbol' in-place by Z-decoding
-// it if necessary.
-void VG_(maybe_redir_or_notify) ( Char* symbol, Addr addr );
+/* Notify the module of a new SegInfo (called from m_debuginfo). */
+extern void VG_(redir_notify_new_SegInfo)( SegInfo* );
=20
-//--------------------------------------------------------------------
-// Code replacement
-//--------------------------------------------------------------------
+/* Notify the module of the disappearance of a SegInfo (also called
+ from m_debuginfo). */
+extern void VG_(redir_notify_delete_SegInfo)( SegInfo* );
=20
-// See include/pub_tool_redir.h for details on how to do code replacemen=
t.
+/* Initialise the module, and load initial "hardwired" redirects. */
+extern void VG_(redir_initialise)( void );
=20
-typedef struct _CodeRedirect CodeRedirect;
=20
-// This is the crucial redirection function. It answers the question:=20
-// should this code address be redirected somewhere else? It's used jus=
t
-// before translating a basic block.
-extern Addr VG_(code_redirect) ( Addr orig );
+//--------------------------------------------------------------------
+// Queries
+//--------------------------------------------------------------------
=20
-/* Set up some default redirects. */
-extern void VG_(setup_code_redirect_table) ( void );
+/* This is the crucial redirection function. It answers the question:
+ should this code address be redirected somewhere else? It's used
+ just before translating a basic block. */
+extern Addr VG_(redir_do_lookup) ( Addr orig );
=20
-extern void VG_(resolve_existing_redirs_with_seginfo)(SegInfo *si);
=20
-
//--------------------------------------------------------------------
// Loading notification
//--------------------------------------------------------------------
@@ -85,14 +82,27 @@
Functions named with this macro should be in client space, ie. in
vgpreload_<tool>.h or vgpreload_core.h. */
=20
-#define VG_NOTIFY_ON_LOAD(name) _vgw_##name
-#define VG_NOTIFY_ON_LOAD_PREFIX "_vgw_"
-#define VG_NOTIFY_ON_LOAD_PREFIX_LEN 5
+#define VG_NOTIFY_ON_LOAD(name) _vgnU_##name
+#define VG_NOTIFY_ON_LOAD_PREFIX "_vgnU_"
+#define VG_NOTIFY_ON_LOAD_PREFIX_LEN 6
=20
-// Called by m_main to get our __libc_freeres wrapper.
-extern Addr VG_(get_libc_freeres_wrapper)(void);
=20
//--------------------------------------------------------------------
+// Demangling of Z-encoded names
+//--------------------------------------------------------------------
+
+/* Demangle 'sym' into its soname and fnname parts, putting them in
+ the specified buffers. Returns a Bool indicating whether the
+ demangled failed or not. A failure can occur because the prefix
+ isn't recognised, the internal Z-escaping is wrong, or because one
+ or the other (or both) of the output buffers becomes full. */
+
+Bool VG_(maybe_Z_demangle) ( const HChar* sym,=20
+ /*OUT*/HChar* so, Int soLen,
+ /*OUT*/HChar* fn, Int fnLen );
+
+
+//--------------------------------------------------------------------
// Function wrapping
//--------------------------------------------------------------------
=20
Modified: branches/FNWRAP/coregrind/vg_preloaded.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/coregrind/vg_preloaded.c 2005-12-04 23:27:14 UTC (rev=
5283)
+++ branches/FNWRAP/coregrind/vg_preloaded.c 2005-12-05 14:26:59 UTC (rev=
5284)
@@ -71,6 +71,8 @@
/*--- end ---*/
/*--------------------------------------------------------------------*/
=20
+#if 0
+
#define PTH_FUNC(ret_ty, f, args...) \
ret_ty VG_REPLACE_FUNCTION(libpthreadZdsoZd0, f)(args); \
ret_ty VG_REPLACE_FUNCTION(libpthreadZdsoZd0, f)(args)
@@ -82,7 +84,6 @@
#include <stdio.h>
#include <pthread.h>
=20
-#if 1
PTH_FUNC(int, pthread_create, // pthread_create@*
pthread_t *thread, const pthread_attr_t *attr,
void *(*start) (void *), void *arg)
Modified: branches/FNWRAP/include/pub_tool_debuginfo.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/include/pub_tool_debuginfo.h 2005-12-04 23:27:14 UTC =
(rev 5283)
+++ branches/FNWRAP/include/pub_tool_debuginfo.h 2005-12-05 14:26:59 UTC =
(rev 5284)
@@ -122,7 +122,7 @@
extern void VG_(seginfo_syms_getidx) ( const SegInfo *si,=20
Int idx,
/*OUT*/Addr* addr,
- /*OUT*/UInt size,
+ /*OUT*/UInt* size,
/*OUT*/HChar** name );
=20
typedef
Modified: branches/FNWRAP/include/pub_tool_redir.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/include/pub_tool_redir.h 2005-12-04 23:27:14 UTC (rev=
5283)
+++ branches/FNWRAP/include/pub_tool_redir.h 2005-12-05 14:26:59 UTC (rev=
5284)
@@ -31,12 +31,12 @@
#ifndef __PUB_TOOL_REDIR_H
#define __PUB_TOOL_REDIR_H
=20
-/* The following macros facilitate function replacement, which is one fo=
rm
- of code replacement.
+/* The following macros facilitate function redirection (redirects).
=20
The general idea is: you can write a function like this:
=20
- ret_type VG_REPLACE_FUNCTION(zEncodedSoname, fnname) ( ... args ..=
. )
+ ret_type=20
+ VG_REDIRECT_FUNCTION_ZU(zEncodedSoname,fnname) ( .. args .. )
{
... body ...
}
@@ -44,53 +44,76 @@
zEncodedSoname should be a Z-encoded soname (see below for Z-encoding
details) and fnname should be an unencoded fn name. The resulting na=
me is
=20
- _vgi_zEncodedSoname_fnname
+ _vgrZU_zEncodedSoname_fnname
=20
- The "_vgi_" is a prefix that gets discarded upon decoding.
+ The "_vgrZU_" is a prefix that gets discarded upon decoding.
+
+ It is also possible to write
+
+ ret_type=20
+ VG_REDIRECT_FUNCTION_ZZ(zEncodedSoname,zEncodedFnname) ( .. args .=
. )
+ {
+ ... body ...
+ }
=20
- When it sees this name, the core's symbol-table reading machinery
- and redirection machinery will conspire to cause calls to the functio=
n
- 'fnname' in object with soname 'zEncodedSoname' to actually be routed=
to
- the function written here. We use this below to define dozens of
- replacements of malloc, free, etc.
+ which means precisely the same, but the function name is also
+ Z-encoded. This can sometimes be necessary. In this case the
+ resulting function name is
=20
+ _vgrZZ_zEncodedSoname_zEncodedFnname
+
+ When it sees this either such name, the core's symbol-table reading
+ machinery and redirection machinery first Z-decode the soname and=20
+ if necessary the fnname. They are encoded so that they may include
+ arbitrary characters, and in particular they may contain '*', which
+ acts as a wildcard.
+
+ They then will conspire to cause calls to any function matching
+ 'fnname' in any object whose soname matches 'soname' to actually be
+ routed to this function. This is used in Valgrind to define dozens
+ of replacements of malloc, free, etc.
+
The soname must be a Z-encoded bit of text because sonames can
- contain dots etc which are not valid symbol names. But don't Z-encod=
e
- the function name, since it will already be a valid symbol name, and =
the
- Z-encoding might screw up the C++ demangling.
+ contain dots etc which are not valid symbol names. The function
+ name may or may not be Z-encoded: to include wildcards it has to be,
+ but Z-encoding C++ function names which are themselves already mangle=
d
+ using Zs in some way is tedious and error prone, so the _ZU variant
+ allows them not to be Z-encoded.
=20
- Note that the soname can contain '*' as a wildcard meaning "match
- anything".
+ Note that the soname "NONE" is specially interpreted to match any
+ shared object which doesn't have a soname.
=20
Note also that the replacement function should probably (must be?) in
client space, so it runs on the simulated CPU. So it must be in
either vgpreload_<tool>.so or vgpreload_core.so. It also only works
with functions in shared objects, I think.
=20
- It is important that the Z-encoded soname contains no unencoded=20
- underscores, since the intercept-handlers in vg_symtab2.c detect
- the end of the soname by looking for the first trailing underscore.
+ It is important that the Z-encoded names contain no unencoded
+ underscores, since the intercept-handlers in m_redir.c detect the
+ end of the soname by looking for the first trailing underscore.
=20
- Z-encoding details: the scheme is like GHC's. It is just about
- readable enough to make a preprocessor unnecessary. First the "_vgi_=
"
- prefix is added, and then the following characters are transformed.
+ Z-encoding details: the scheme is like GHC's. It is just about
+ readable enough to make a preprocessor unnecessary. First the
+ "_vgrZU_" or "_vgrZZ_" prefix is added, and then the following
+ characters are transformed.
=20
- * --> Za ('a' for "asterisk")
- + --> Zp
- : --> Zc
- . --> Zd
- _ --> Zu
- - --> Zh ('h' for...
[truncated message content] |
|
From: <sv...@va...> - 2005-12-05 14:26:18
|
Author: sewardj
Date: 2005-12-05 14:26:09 +0000 (Mon, 05 Dec 2005)
New Revision: 1483
Log:
prototype wibble
Modified:
branches/FNWRAP/priv/guest-ppc32/toIR.c
Modified: branches/FNWRAP/priv/guest-ppc32/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/FNWRAP/priv/guest-ppc32/toIR.c 2005-12-02 16:03:46 UTC (rev =
1482)
+++ branches/FNWRAP/priv/guest-ppc32/toIR.c 2005-12-05 14:26:09 UTC (rev =
1483)
@@ -365,7 +365,7 @@
return mask;
}
=20
-static Addr64 nextInsnAddr() { return guest_CIA_curr_instr + 4; }
+static Addr64 nextInsnAddr(void) { return guest_CIA_curr_instr + 4; }
=20
=20
/*------------------------------------------------------------*/
|
|
From: Julian S. <js...@ac...> - 2005-12-05 13:05:01
|
> I fail to build TOOLs after I update my working copy. Here is the > output, Did you make completely clean before rebuilding, including rerunning autogen.sh and configure? J |
|
From: Yao Qi <qiy...@cn...> - 2005-12-05 11:18:48
|
I fail to build TOOLs after I update my working copy. Here is the
output,
[qiyao@plinuxt6 lackey]$ make
Making all in .
make[1]: Entering directory `/home/qiyao/svn/valgrind/lackey'
gcc -m32 -O -g -Wmissing-prototypes -Winline -Wall -Wshadow
-Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
-Wno-long-long -Wdeclaration-after-statement -o lackey-ppc32-linux
-static -Wl,-defsym,valt_load_address=0x70000000 -nodefaultlibs
-nostartfiles -u _start -m32 -Wl,-T,../valt_load_address_ppc32_linux.lds
lackey_ppc32_linux-lk_main.o ../coregrind/libcoregrind_ppc32_linux.a
../VEX/libvex_ppc32_linux.a -lgcc
gcc -m32 -O -g -Wmissing-prototypes -Winline -Wall -Wshadow
-Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
-Wno-long-long -Wdeclaration-after-statement -o lackey-ppc64-linux
-static -Wl,-defsym,valt_load_address=0x70000000 -nodefaultlibs
-nostartfiles -u _start -m64 -Wl,-T,../valt_load_address_ppc64_linux.lds
lackey_ppc64_linux-lk_main.o ../coregrind/libcoregrind_ppc64_linux.a
../VEX/libvex_ppc64_linux.a -lgcc
../coregrind/libcoregrind_ppc64_linux.a(libcoregrind_ppc64_linux_a-m_syscall.o)(.text+0x18c):
In function `vgPlain_do_syscall':
/home/qiyao/svn/valgrind/coregrind/m_syscall.c:269: undefined reference
to `do_syscall_WRK'
../coregrind/libcoregrind_ppc64_linux.a(libcoregrind_ppc64_linux_a-scheduler.o)(.text+0xefc):
In function `run_thread_for_a_while':
m_scheduler/scheduler.c:431: undefined reference to
`vgPlain_run_innerloop'
../coregrind/libcoregrind_ppc64_linux.a(libcoregrind_ppc64_linux_a-syswrap-main.o)(.text+0x18):
In function `do_syscall_for_client':
m_syswrap/syswrap-main.c:238: undefined reference to
`vgModuleLocal_do_syscall_for_client_WRK'
../coregrind/libcoregrind_ppc64_linux.a(libcoregrind_ppc64_linux_a-syswrap-linux.o)(.text+0x4f0):
In function `vgPlain_main_thread_wrapper_NORETURN':
m_syswrap/syswrap-linux.c:276: undefined reference to
`vgModuleLocal_call_on_new_stack_0_1'
../coregrind/libcoregrind_ppc64_linux.a(libcoregrind_ppc64_linux_a-syswrap-ppc64-linux.o)(.text+0x358):
In function `do_clone':
m_syswrap/syswrap-ppc64-linux.c:338: undefined reference to
`do_syscall_clone_ppc64_linux'
collect2: ld returned 1 exit status
make[1]: *** [lackey-ppc64-linux] Error 1
make[1]: Leaving directory `/home/qiyao/svn/valgrind/lackey'
make: *** [all-recursive] Error 1
[qiyao@plinuxt6 lackey]$ nm ../coregrind/libcoregrind_ppc64_linux_a-m_syscall.o | grep WRK
0000000000000114 t .do_syscall_WRK
U do_syscall_WRK
I am not so clear about dot symbol name in PPC64 ABI, so I try to add
"do_syscall_WRK:" at line 222 coregrind/m_syscall.c like this,
220 asm(
221 ".text\n"
222 "do_syscall_WRK:\n"
223 ".do_syscall_WRK:\n"
224 "std 3,-16(1)\n" /* stash arg */
Although the symbol "do_syscall_WRK" could be resolved, I do not think it is
a smart way. Could anyone here have a look? Any one could confirm or
deny this. Thanks in advance!
--
Regards, Yao
------------
Yao Qi
|
|
From: Josef W. <Jos...@gm...> - 2005-12-05 05:29:14
|
On Friday 02 December 2005 15:28, sv...@va... wrote:
> Initial function wrapping hacks. Note, a work in progress - expect
> borkage. Works well enough to intercept pthread_mutex_{lock,unlock}.
Just to understand the idea: You have a per-thread flag to decide about
non-redirection. Ie. only one wrapper can be active at one point in time.
Is this enough for pthread? If one pthread function is calling another
one in its implementation, no wrapper will be called.
Is there any way to support longjmps in wrapped functions?
Josef
|
|
From: <js...@ac...> - 2005-12-05 03:59:42
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2005-12-05 03:30:01 GMT
Checking out vex source tree ... done
Building vex ... done
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 208 tests, 6 stderr failures, 1 stdout failure =================
memcheck/tests/leak-tree (stderr)
memcheck/tests/mempool (stderr)
memcheck/tests/stack_switch (stderr)
memcheck/tests/x86/scalar (stderr)
none/tests/mremap2 (stdout)
none/tests/x86/faultstatus (stderr)
none/tests/x86/int (stderr)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out vex source tree ... done
Building vex ... done
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... failed
Last 20 lines of verbose log follow echo
Making all in lib
make[3]: Entering directory `/home/sewardj/Nightly/valgrind/docs/lib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/sewardj/Nightly/valgrind/docs/lib'
Making all in images
make[3]: Entering directory `/home/sewardj/Nightly/valgrind/docs/images'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/sewardj/Nightly/valgrind/docs/images'
Making all in internals
make[3]: Entering directory `/home/sewardj/Nightly/valgrind/docs/internals'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/sewardj/Nightly/valgrind/docs/internals'
make[3]: Entering directory `/home/sewardj/Nightly/valgrind/docs'
make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
make[3]: Leaving directory `/home/sewardj/Nightly/valgrind/docs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/sewardj/Nightly/valgrind/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sewardj/Nightly/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Mon Dec 5 03:41:30 2005
--- new.short Mon Dec 5 03:59:49 2005
***************
*** 5,28 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- Making all in lib
- make[3]: Entering directory `/home/sewardj/Nightly/valgrind/docs/lib'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/home/sewardj/Nightly/valgrind/docs/lib'
- Making all in images
- make[3]: Entering directory `/home/sewardj/Nightly/valgrind/docs/images'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/home/sewardj/Nightly/valgrind/docs/images'
- Making all in internals
- make[3]: Entering directory `/home/sewardj/Nightly/valgrind/docs/internals'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/home/sewardj/Nightly/valgrind/docs/internals'
- make[3]: Entering directory `/home/sewardj/Nightly/valgrind/docs'
- make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
- make[3]: Leaving directory `/home/sewardj/Nightly/valgrind/docs'
- make[2]: *** [all-recursive] Error 1
- make[2]: Leaving directory `/home/sewardj/Nightly/valgrind/docs'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/home/sewardj/Nightly/valgrind'
- make: *** [all] Error 2
--- 5,19 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 208 tests, 6 stderr failures, 1 stdout failure =================
! memcheck/tests/leak-tree (stderr)
! memcheck/tests/mempool (stderr)
! memcheck/tests/stack_switch (stderr)
! memcheck/tests/x86/scalar (stderr)
! none/tests/mremap2 (stdout)
! none/tests/x86/faultstatus (stderr)
! none/tests/x86/int (stderr)
|
|
From: <js...@ac...> - 2005-12-05 03:47:04
|
Nightly build on g5 ( YDL 4.0, ppc970 ) started at 2005-12-05 04:40:00 CET Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 175 tests, 15 stderr failures, 0 stdout failures ================= memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/xml1 (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) |
|
From: Tom H. <to...@co...> - 2005-12-05 03:38:46
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2005-12-05 03:30:05 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
== 210 tests, 7 stderr failures, 1 stdout failure =================
memcheck/tests/leak-tree (stderr)
memcheck/tests/mempool (stderr)
memcheck/tests/pointer-trace (stderr)
memcheck/tests/stack_switch (stderr)
memcheck/tests/x86/scalar (stderr)
none/tests/mremap2 (stdout)
none/tests/x86/faultstatus (stderr)
none/tests/x86/int (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
Making all in lib
make[3]: Entering directory `/tmp/valgrind.17282/valgrind/docs/lib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.17282/valgrind/docs/lib'
Making all in images
make[3]: Entering directory `/tmp/valgrind.17282/valgrind/docs/images'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.17282/valgrind/docs/images'
Making all in internals
make[3]: Entering directory `/tmp/valgrind.17282/valgrind/docs/internals'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.17282/valgrind/docs/internals'
make[3]: Entering directory `/tmp/valgrind.17282/valgrind/docs'
make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
make[3]: Leaving directory `/tmp/valgrind.17282/valgrind/docs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/valgrind.17282/valgrind/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/valgrind.17282/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Mon Dec 5 03:32:39 2005
--- new.short Mon Dec 5 03:38:42 2005
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- Making all in lib
- make[3]: Entering directory `/tmp/valgrind.17282/valgrind/docs/lib'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.17282/valgrind/docs/lib'
- Making all in images
- make[3]: Entering directory `/tmp/valgrind.17282/valgrind/docs/images'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.17282/valgrind/docs/images'
- Making all in internals
- make[3]: Entering directory `/tmp/valgrind.17282/valgrind/docs/internals'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.17282/valgrind/docs/internals'
- make[3]: Entering directory `/tmp/valgrind.17282/valgrind/docs'
- make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
- make[3]: Leaving directory `/tmp/valgrind.17282/valgrind/docs'
- make[2]: *** [all-recursive] Error 1
- make[2]: Leaving directory `/tmp/valgrind.17282/valgrind/docs'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/valgrind.17282/valgrind'
- make: *** [all] Error 2
--- 3,18 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 210 tests, 7 stderr failures, 1 stdout failure =================
! memcheck/tests/leak-tree (stderr)
! memcheck/tests/mempool (stderr)
! memcheck/tests/pointer-trace (stderr)
! memcheck/tests/stack_switch (stderr)
! memcheck/tests/x86/scalar (stderr)
! none/tests/mremap2 (stdout)
! none/tests/x86/faultstatus (stderr)
! none/tests/x86/int (stderr)
|
|
From: Tom H. <th...@cy...> - 2005-12-05 03:26:17
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-12-05 03:15:06 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
== 209 tests, 17 stderr failures, 0 stdout failures =================
memcheck/tests/addressable (stderr)
memcheck/tests/describe-block (stderr)
memcheck/tests/erringfds (stderr)
memcheck/tests/leak-0 (stderr)
memcheck/tests/leak-cycle (stderr)
memcheck/tests/leak-regroot (stderr)
memcheck/tests/leak-tree (stderr)
memcheck/tests/match-overrun (stderr)
memcheck/tests/mempool (stderr)
memcheck/tests/partial_load_dflt (stderr)
memcheck/tests/partial_load_ok (stderr)
memcheck/tests/partiallydefinedeq (stderr)
memcheck/tests/pointer-trace (stderr)
memcheck/tests/sigkill (stderr)
memcheck/tests/stack_changes (stderr)
none/tests/x86/faultstatus (stderr)
none/tests/x86/int (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
Making all in lib
make[3]: Entering directory `/tmp/valgrind.3273/valgrind/docs/lib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.3273/valgrind/docs/lib'
Making all in images
make[3]: Entering directory `/tmp/valgrind.3273/valgrind/docs/images'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.3273/valgrind/docs/images'
Making all in internals
make[3]: Entering directory `/tmp/valgrind.3273/valgrind/docs/internals'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.3273/valgrind/docs/internals'
make[3]: Entering directory `/tmp/valgrind.3273/valgrind/docs'
make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
make[3]: Leaving directory `/tmp/valgrind.3273/valgrind/docs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/valgrind.3273/valgrind/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/valgrind.3273/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Mon Dec 5 03:19:22 2005
--- new.short Mon Dec 5 03:26:07 2005
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- Making all in lib
- make[3]: Entering directory `/tmp/valgrind.3273/valgrind/docs/lib'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.3273/valgrind/docs/lib'
- Making all in images
- make[3]: Entering directory `/tmp/valgrind.3273/valgrind/docs/images'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.3273/valgrind/docs/images'
- Making all in internals
- make[3]: Entering directory `/tmp/valgrind.3273/valgrind/docs/internals'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.3273/valgrind/docs/internals'
- make[3]: Entering directory `/tmp/valgrind.3273/valgrind/docs'
- make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
- make[3]: Leaving directory `/tmp/valgrind.3273/valgrind/docs'
- make[2]: *** [all-recursive] Error 1
- make[2]: Leaving directory `/tmp/valgrind.3273/valgrind/docs'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/valgrind.3273/valgrind'
- make: *** [all] Error 2
--- 3,27 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 209 tests, 17 stderr failures, 0 stdout failures =================
! memcheck/tests/addressable (stderr)
! memcheck/tests/describe-block (stderr)
! memcheck/tests/erringfds (stderr)
! memcheck/tests/leak-0 (stderr)
! memcheck/tests/leak-cycle (stderr)
! memcheck/tests/leak-regroot (stderr)
! memcheck/tests/leak-tree (stderr)
! memcheck/tests/match-overrun (stderr)
! memcheck/tests/mempool (stderr)
! memcheck/tests/partial_load_dflt (stderr)
! memcheck/tests/partial_load_ok (stderr)
! memcheck/tests/partiallydefinedeq (stderr)
! memcheck/tests/pointer-trace (stderr)
! memcheck/tests/sigkill (stderr)
! memcheck/tests/stack_changes (stderr)
! none/tests/x86/faultstatus (stderr)
! none/tests/x86/int (stderr)
|
|
From: Tom H. <th...@cy...> - 2005-12-05 03:24:15
|
Nightly build on dellow ( x86_64, Fedora Core 4 ) started at 2005-12-05 03:10:12 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
== 227 tests, 5 stderr failures, 1 stdout failure =================
memcheck/tests/mempool (stderr)
memcheck/tests/x86/scalar (stderr)
none/tests/amd64/faultstatus (stderr)
none/tests/mremap2 (stdout)
none/tests/x86/faultstatus (stderr)
none/tests/x86/int (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
Making all in lib
make[3]: Entering directory `/tmp/valgrind.10133/valgrind/docs/lib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.10133/valgrind/docs/lib'
Making all in images
make[3]: Entering directory `/tmp/valgrind.10133/valgrind/docs/images'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.10133/valgrind/docs/images'
Making all in internals
make[3]: Entering directory `/tmp/valgrind.10133/valgrind/docs/internals'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.10133/valgrind/docs/internals'
make[3]: Entering directory `/tmp/valgrind.10133/valgrind/docs'
make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
make[3]: Leaving directory `/tmp/valgrind.10133/valgrind/docs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/valgrind.10133/valgrind/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/valgrind.10133/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Mon Dec 5 03:18:04 2005
--- new.short Mon Dec 5 03:24:07 2005
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- Making all in lib
- make[3]: Entering directory `/tmp/valgrind.10133/valgrind/docs/lib'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.10133/valgrind/docs/lib'
- Making all in images
- make[3]: Entering directory `/tmp/valgrind.10133/valgrind/docs/images'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.10133/valgrind/docs/images'
- Making all in internals
- make[3]: Entering directory `/tmp/valgrind.10133/valgrind/docs/internals'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.10133/valgrind/docs/internals'
- make[3]: Entering directory `/tmp/valgrind.10133/valgrind/docs'
- make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
- make[3]: Leaving directory `/tmp/valgrind.10133/valgrind/docs'
- make[2]: *** [all-recursive] Error 1
- make[2]: Leaving directory `/tmp/valgrind.10133/valgrind/docs'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/valgrind.10133/valgrind'
- make: *** [all] Error 2
--- 3,16 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 227 tests, 5 stderr failures, 1 stdout failure =================
! memcheck/tests/mempool (stderr)
! memcheck/tests/x86/scalar (stderr)
! none/tests/amd64/faultstatus (stderr)
! none/tests/mremap2 (stdout)
! none/tests/x86/faultstatus (stderr)
! none/tests/x86/int (stderr)
|
|
From: Tom H. <th...@cy...> - 2005-12-05 03:20:42
|
Nightly build on aston ( x86_64, Fedora Core 3 ) started at 2005-12-05 03:05:14 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
== 227 tests, 6 stderr failures, 1 stdout failure =================
memcheck/tests/mempool (stderr)
memcheck/tests/x86/scalar (stderr)
memcheck/tests/x86/scalar_supp (stderr)
none/tests/amd64/faultstatus (stderr)
none/tests/mremap2 (stdout)
none/tests/x86/faultstatus (stderr)
none/tests/x86/int (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
Making all in lib
make[3]: Entering directory `/tmp/valgrind.19041/valgrind/docs/lib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.19041/valgrind/docs/lib'
Making all in images
make[3]: Entering directory `/tmp/valgrind.19041/valgrind/docs/images'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.19041/valgrind/docs/images'
Making all in internals
make[3]: Entering directory `/tmp/valgrind.19041/valgrind/docs/internals'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.19041/valgrind/docs/internals'
make[3]: Entering directory `/tmp/valgrind.19041/valgrind/docs'
make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
make[3]: Leaving directory `/tmp/valgrind.19041/valgrind/docs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/valgrind.19041/valgrind/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/valgrind.19041/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Mon Dec 5 03:11:37 2005
--- new.short Mon Dec 5 03:20:33 2005
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- Making all in lib
- make[3]: Entering directory `/tmp/valgrind.19041/valgrind/docs/lib'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.19041/valgrind/docs/lib'
- Making all in images
- make[3]: Entering directory `/tmp/valgrind.19041/valgrind/docs/images'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.19041/valgrind/docs/images'
- Making all in internals
- make[3]: Entering directory `/tmp/valgrind.19041/valgrind/docs/internals'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.19041/valgrind/docs/internals'
- make[3]: Entering directory `/tmp/valgrind.19041/valgrind/docs'
- make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
- make[3]: Leaving directory `/tmp/valgrind.19041/valgrind/docs'
- make[2]: *** [all-recursive] Error 1
- make[2]: Leaving directory `/tmp/valgrind.19041/valgrind/docs'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/valgrind.19041/valgrind'
- make: *** [all] Error 2
--- 3,17 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 227 tests, 6 stderr failures, 1 stdout failure =================
! memcheck/tests/mempool (stderr)
! memcheck/tests/x86/scalar (stderr)
! memcheck/tests/x86/scalar_supp (stderr)
! none/tests/amd64/faultstatus (stderr)
! none/tests/mremap2 (stdout)
! none/tests/x86/faultstatus (stderr)
! none/tests/x86/int (stderr)
|
|
From: Tom H. <th...@cy...> - 2005-12-05 03:16:44
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-12-05 03:00:03 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
== 227 tests, 6 stderr failures, 0 stdout failures =================
memcheck/tests/mempool (stderr)
memcheck/tests/pointer-trace (stderr)
none/tests/amd64/faultstatus (stderr)
none/tests/fdleak_fcntl (stderr)
none/tests/x86/faultstatus (stderr)
none/tests/x86/int (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
Making all in lib
make[3]: Entering directory `/tmp/valgrind.10412/valgrind/docs/lib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.10412/valgrind/docs/lib'
Making all in images
make[3]: Entering directory `/tmp/valgrind.10412/valgrind/docs/images'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.10412/valgrind/docs/images'
Making all in internals
make[3]: Entering directory `/tmp/valgrind.10412/valgrind/docs/internals'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/valgrind.10412/valgrind/docs/internals'
make[3]: Entering directory `/tmp/valgrind.10412/valgrind/docs'
make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
make[3]: Leaving directory `/tmp/valgrind.10412/valgrind/docs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/valgrind.10412/valgrind/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/valgrind.10412/valgrind'
make: *** [all] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Mon Dec 5 03:05:01 2005
--- new.short Mon Dec 5 03:16:30 2005
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- Making all in lib
- make[3]: Entering directory `/tmp/valgrind.10412/valgrind/docs/lib'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.10412/valgrind/docs/lib'
- Making all in images
- make[3]: Entering directory `/tmp/valgrind.10412/valgrind/docs/images'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.10412/valgrind/docs/images'
- Making all in internals
- make[3]: Entering directory `/tmp/valgrind.10412/valgrind/docs/internals'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/tmp/valgrind.10412/valgrind/docs/internals'
- make[3]: Entering directory `/tmp/valgrind.10412/valgrind/docs'
- make[3]: *** No rule to make target `valgrind.1', needed by `all-am'. Stop.
- make[3]: Leaving directory `/tmp/valgrind.10412/valgrind/docs'
- make[2]: *** [all-recursive] Error 1
- make[2]: Leaving directory `/tmp/valgrind.10412/valgrind/docs'
- make[1]: *** [all-recursive] Error 1
- make[1]: Leaving directory `/tmp/valgrind.10412/valgrind'
- make: *** [all] Error 2
--- 3,16 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 227 tests, 6 stderr failures, 0 stdout failures =================
! memcheck/tests/mempool (stderr)
! memcheck/tests/pointer-trace (stderr)
! none/tests/amd64/faultstatus (stderr)
! none/tests/fdleak_fcntl (stderr)
! none/tests/x86/faultstatus (stderr)
! none/tests/x86/int (stderr)
|