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
(31) |
2
(27) |
|
3
(25) |
4
(21) |
5
(21) |
6
(21) |
7
(32) |
8
(23) |
9
(15) |
|
10
(12) |
11
(9) |
12
(10) |
13
(10) |
14
(9) |
15
(7) |
16
(20) |
|
17
(14) |
18
(71) |
19
(67) |
20
(50) |
21
(25) |
22
(15) |
23
(37) |
|
24
(25) |
25
(41) |
26
(34) |
27
(57) |
28
(20) |
29
(30) |
30
(13) |
|
31
(18) |
|
|
|
|
|
|
|
From: Nicholas N. <nj...@cs...> - 2005-07-07 21:13:04
|
On Thu, 7 Jul 2005, Greg Parker wrote: >> I see your point but this is a non-issue for PPC, right? Because it >> explicitly invalidates the I-cache. > > Yes, but Mac OS X on Intel is coming soon. Oh yeah... duh. I should've thought of that. N |
|
From: Greg P. <gp...@us...> - 2005-07-07 20:51:34
|
Nicholas Nethercote writes: > On Thu, 7 Jul 2005, Greg Parker wrote: > > Valgrind should mark stacks explicitly. Mac OS X's stacks are always > > fixed-size, so none of them would be marked SF_GROWDOWN. > > I see your point but this is a non-issue for PPC, right? Because it > explicitly invalidates the I-cache. Yes, but Mac OS X on Intel is coming soon. -- Greg Parker gp...@us... |
|
From: Nicholas N. <nj...@cs...> - 2005-07-07 19:14:17
|
On Thu, 7 Jul 2005, Greg Parker wrote: > Valgrind should mark stacks explicitly. Mac OS X's stacks are always > fixed-size, so none of them would be marked SF_GROWDOWN. I see your point but this is a non-issue for PPC, right? Because it explicitly invalidates the I-cache. N |
|
From: Robert W. <rj...@du...> - 2005-07-07 18:52:49
|
On Thu, 2005-07-07 at 14:46 -0400, Greg Parker wrote: > sv...@va... writes: > > --smc-support-stack > >=20 > > Add checking code for translations taken from segments which > > have the SF_GROWDOWN flag set -- stacks, basically. > > This is the default. It should make gcc nested functions and > > GNU Ada work correctly with no intervention from the user. >=20 > Valgrind should mark stacks explicitly. Mac OS X's stacks are always=20 > fixed-size, so none of them would be marked SF_GROWDOWN. There's currently a mechanism in place to mark stacks as such, for the user-level thread problem. Probably that could be co-opted for this purpose. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |
|
From: Greg P. <gp...@us...> - 2005-07-07 18:46:30
|
sv...@va... writes: > --smc-support-stack > > Add checking code for translations taken from segments which > have the SF_GROWDOWN flag set -- stacks, basically. > This is the default. It should make gcc nested functions and > GNU Ada work correctly with no intervention from the user. Valgrind should mark stacks explicitly. Mac OS X's stacks are always fixed-size, so none of them would be marked SF_GROWDOWN. -- Greg Parker gp...@us... |
|
From: Craig C. <cc...@us...> - 2005-07-07 17:35:26
|
Hi, This patch applies to Paul Mackerras' latest Valgrind PPC port (http://valgrind.org/downloads/pmk/valgrind-2.4.0-ppc.tar.bz2). When returning from a signal running on a stack specified with the sigaltstack() call, we were invalidating all of the memory between the location of the sigaltstack and the original stack location. The attached patch corrects this by detecting the alternate stack in the signal_return code, and modifying the area of invalidated memory as appropriate. Thanks, Craig -- Craig Chaney cc...@us... |
|
From: <sv...@va...> - 2005-07-07 14:29:33
|
Author: sewardj
Date: 2005-07-07 15:29:21 +0100 (Thu, 07 Jul 2005)
New Revision: 4127
Log:
Add a nested-functions test from Lee Kindness.
Added:
trunk/none/tests/nestedfns.c
trunk/none/tests/nestedfns.stderr.exp
trunk/none/tests/nestedfns.stdout.exp
trunk/none/tests/nestedfns.vgtest
Modified:
trunk/none/tests/Makefile.am
Modified: trunk/none/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/Makefile.am 2005-07-07 13:52:53 UTC (rev 4126)
+++ trunk/none/tests/Makefile.am 2005-07-07 14:29:21 UTC (rev 4127)
@@ -57,6 +57,7 @@
mq.stderr.exp mq.vgtest \
mremap.stderr.exp mremap.stdout.exp mremap.vgtest \
munmap_exe.stderr.exp munmap_exe.vgtest \
+ nestedfns.stderr.exp nestedfns.stdout.exp nestedfns.vgtest \
pending.stdout.exp pending.stderr.exp pending.vgtest \
pth_atfork1.stderr.exp pth_atfork1.stdout.exp pth_atfork1.vgtest \
pth_blockedsig.stderr.exp \
@@ -107,6 +108,7 @@
fdleak_socketpair \
floored fork fucomip manythreads \
munmap_exe map_unaligned map_unmap mq mremap \
+ nestedfns \
pending \
pth_atfork1 pth_blockedsig pth_cancel1 pth_cancel2 pth_cvsimple \
pth_empty pth_exit pth_exit2 pth_mutexspeed pth_once pth_rwlock \
Added: trunk/none/tests/nestedfns.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/none/tests/nestedfns.c 2005-07-07 13:52:53 UTC (rev 4126)
+++ trunk/none/tests/nestedfns.c 2005-07-07 14:29:21 UTC (rev 4127)
@@ -0,0 +1,41 @@
+
+/* This is a test program from Lee Kindness which used to fail on V
+ because gcc implements the nested function mumbo jumbo using self
+ modifying code on the stack, at least on x86 and amd64. It now
+ works transparently because by default V now generates
+ self-checking translations for translations taken from stack-like
+ segments.
+*/
+
+#include <stdio.h>=20
+=20
+ static void call_func(void (*sel)(void))=20
+ {=20
+ sel();=20
+ }=20
+=20
+ void test1()=20
+ {=20
+ void test1_inner()=20
+ {=20
+ printf( "Inside test1\n" );=20
+ }=20
+ call_func( test1_inner );=20
+ }=20
+=20
+ void test2()=20
+ {=20
+ void test2_inner()=20
+ {=20
+ printf( "Inside test2\n" );=20
+ }=20
+ call_func( test2_inner );=20
+ }=20
+=20
+ int main(int argc, char** argv)=20
+ {=20
+ test1();=20
+ test2();=20
+ return( 0 );=20
+ }=20
+=20
Added: trunk/none/tests/nestedfns.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/nestedfns.stderr.exp 2005-07-07 13:52:53 UTC (rev 41=
26)
+++ trunk/none/tests/nestedfns.stderr.exp 2005-07-07 14:29:21 UTC (rev 41=
27)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/nestedfns.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/nestedfns.stdout.exp 2005-07-07 13:52:53 UTC (rev 41=
26)
+++ trunk/none/tests/nestedfns.stdout.exp 2005-07-07 14:29:21 UTC (rev 41=
27)
@@ -0,0 +1,2 @@
+Inside test1
+Inside test2
Added: trunk/none/tests/nestedfns.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/nestedfns.vgtest 2005-07-07 13:52:53 UTC (rev 4126)
+++ trunk/none/tests/nestedfns.vgtest 2005-07-07 14:29:21 UTC (rev 4127)
@@ -0,0 +1 @@
+prog: nestedfns
|
|
From: <sv...@va...> - 2005-07-07 14:16:33
|
Author: sewardj
Date: 2005-07-07 15:15:35 +0100 (Thu, 07 Jul 2005)
New Revision: 1267
Log:
My life is one endless stream of small things which don't quite work.
This time it's gcc giving us an instruction with REX.W redundantly set
to 1.
Modified:
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/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
--- trunk/priv/guest-amd64/toIR.c 2005-07-07 13:52:03 UTC (rev 1266)
+++ trunk/priv/guest-amd64/toIR.c 2005-07-07 14:15:35 UTC (rev 1267)
@@ -3538,7 +3538,7 @@
break;
case 4: /* jmp Ev */
/* Ignore any sz value and operate as if sz=3D=3D8. */
- vassert(sz =3D=3D 4);
+ vassert(sz =3D=3D 4 || sz =3D=3D 8);
sz =3D 8;
t3 =3D newTemp(Ity_I64);
assign(t3, getIRegE(sz,pfx,modrm));
|
|
From: Nicholas N. <nj...@cs...> - 2005-07-07 14:04:06
|
On Thu, 7 Jul 2005, Julian Seward wrote: > I was thinking that --smc-support is an ugly name; perhaps > --smc-check=none|stack|all is nicer? Any better suggestions? --smc-check sounds fine to me. N |
|
From: <sv...@va...> - 2005-07-07 13:52:59
|
Author: sewardj
Date: 2005-07-07 14:52:53 +0100 (Thu, 07 Jul 2005)
New Revision: 4126
Log:
Don't allow vex to chase into any block for which we might want to create
a self-checking translation.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
trunk/coregrind/m_translate.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.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_aspacemgr/aspacemgr.c 2005-07-07 13:20:31 UTC (rev =
4125)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-07-07 13:52:53 UTC (rev =
4126)
@@ -222,7 +222,7 @@
an address after it, and 0 if it denotes an address covered by
seg.=20
*/
-static Int compare_addr_with_seg ( Addr a, Segment* seg )
+static inline Int compare_addr_with_seg ( Addr a, Segment* seg )
{
if (a < seg->addr)=20
return -1;
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-07-07 13:20:31 UTC (rev 4125)
+++ trunk/coregrind/m_translate.c 2005-07-07 13:52:53 UTC (rev 4126)
@@ -380,18 +380,46 @@
/* This stops Vex from chasing into function entry points that we wish
to redirect. Chasing across them obviously defeats the redirect
mechanism, with bad effects for Memcheck, Addrcheck, and possibly
- others. */
+ others.
+
+ Also, we must stop Vex chasing into blocks for which we might want
+ to self checking.
+*/
static Bool chase_into_ok ( Addr64 addr64 )
{
- Addr addr =3D (Addr)addr64;
- if (addr !=3D VG_(code_redirect)(addr)) {
- if (0) VG_(printf)("not chasing into 0x%x\n", addr);
- return False;
- } else {
- return True; /* ok to chase into 'addr' */
- }
+ /* Work through a list of possibilities why we might not want to
+ allow a chase. */
+ Addr addr =3D (Addr)addr64;
+
+ /* All chasing disallowed if all bbs require self-checks. */
+ if (VG_(clo_smc_support) =3D=3D Vg_SmcAll)
+ goto dontchase;
+
+ /* AAABBBCCC: if default self-checks are in force, reject if we
+ would choose to have a self-check for the dest. Note, this must
+ match the logic at XXXYYYZZZ below. */
+ if (VG_(clo_smc_support) =3D=3D Vg_SmcStack) {
+ Segment* seg =3D VG_(find_segment)(addr);
+ if (seg && (seg->flags & SF_GROWDOWN))
+ goto dontchase;
+ }
+
+ /* Destination is redirected? */
+ if (addr !=3D VG_(code_redirect)(addr))
+ goto dontchase;
+
+ /* well, ok then. go on and chase. */
+ return True;
+
+ vg_assert(0);
+ /*NOTREACHED*/
+
+ dontchase:
+ if (0) VG_(printf)("not chasing into 0x%x\n", addr);
+ return False;
}
=20
+
Bool VG_(translate) ( ThreadId tid,=20
Addr64 orig_addr,
Bool debugging_translation,
@@ -509,6 +537,7 @@
case Vg_SmcNone: do_self_check =3D False; break;
case Vg_SmcAll: do_self_check =3D True; break;
case Vg_SmcStack:=20
+ /* XXXYYYZZZ: must match the logic at AAABBBCCC above */
do_self_check =3D seg ? toBool(seg->flags & SF_GROWDOWN) : Fals=
e;
break;
default: vg_assert2(0, "unknown VG_(clo_smc_support) value");
|
|
From: <sv...@va...> - 2005-07-07 13:52:10
|
Author: sewardj
Date: 2005-07-07 14:52:03 +0100 (Thu, 07 Jul 2005)
New Revision: 1266
Log:
Comment-only-change: record subtle interactions between self-checks
and bb chasing.
Modified:
trunk/pub/libvex.h
Modified: trunk/pub/libvex.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/pub/libvex.h 2005-07-07 13:12:04 UTC (rev 1265)
+++ trunk/pub/libvex.h 2005-07-07 13:52:03 UTC (rev 1266)
@@ -294,7 +294,19 @@
Int traceflags
);
=20
+/* A subtlety re interaction between self-checking translations and
+ bb-chasing. The supplied chase_into_ok function should say NO
+ (False) when presented with any address for which you might want to
+ make a self-checking translation.
=20
+ If it doesn't do that, you may end up with Vex chasing from BB #1
+ to BB #2 (fine); but if you wanted checking for #2 and not #1, that
+ would not be the result. Therefore chase_into_ok should disallow
+ following into #2. That will force the caller to eventually
+ request a new translation starting at #2, at which point Vex will
+ correctly observe the make-a-self-check flag. */
+
+
/*-------------------------------------------------------*/
/*--- Show accumulated statistics ---*/
/*-------------------------------------------------------*/
|
|
From: Julian S. <js...@ac...> - 2005-07-07 13:41:52
|
> I've closed bug #69511, which was our oldest open bug, > from December 2003. Cool -- #69511 contains a test case. I'll add it to the test suite. > > These are difficult to send by email :-) What would be appreciated > > is a regression test in C, one that fails with --smc-support=none > > but succeeds with --smc-support=stack. Any chance? > > And one that fails with --smc-support=stack but succeeds with > --smc-support=all would be useful too... I was thinking that --smc-support is an ugly name; perhaps --smc-check=none|stack|all is nicer? Any better suggestions? J |
|
From: Nicholas N. <nj...@cs...> - 2005-07-07 13:34:22
|
On Thu, 7 Jul 2005, Julian Seward wrote: >> I owe you a beer. In fact I owe you many beers! Nice work, Julian. I've closed bug #69511, which was our oldest open bug, from December 2003. > These are difficult to send by email :-) What would be appreciated > is a regression test in C, one that fails with --smc-support=none > but succeeds with --smc-support=stack. Any chance? And one that fails with --smc-support=stack but succeeds with --smc-support=all would be useful too... N |
|
From: <sv...@va...> - 2005-07-07 13:20:33
|
Author: sewardj
Date: 2005-07-07 14:20:31 +0100 (Thu, 07 Jul 2005)
New Revision: 4125
Log:
Self-modifying-code check for amd64.
Added:
trunk/none/tests/amd64/smc1.c
trunk/none/tests/amd64/smc1.stderr.exp
trunk/none/tests/amd64/smc1.stdout.exp
trunk/none/tests/amd64/smc1.vgtest
Modified:
trunk/none/tests/amd64/Makefile.am
Modified: trunk/none/tests/amd64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/amd64/Makefile.am 2005-07-07 11:32:37 UTC (rev 4124)
+++ trunk/none/tests/amd64/Makefile.am 2005-07-07 13:20:31 UTC (rev 4125)
@@ -7,10 +7,11 @@
EXTRA_DIST =3D $(noinst_SCRIPTS) \
$(addsuffix .stderr.exp,$(INSN_TESTS)) \
$(addsuffix .stdout.exp,$(INSN_TESTS)) \
- $(addsuffix .vgtest,$(INSN_TESTS))
+ $(addsuffix .vgtest,$(INSN_TESTS)) \
+ smc1.stderr.exp smc1.stdout.exp smc1.vgtest
=20
check_PROGRAMS =3D \
- $(INSN_TESTS)
+ $(INSN_TESTS) smc1
=20
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude
AM_CXXFLAGS =3D $(AM_CFLAGS)
Added: trunk/none/tests/amd64/smc1.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/none/tests/amd64/smc1.c 2005-07-07 11:32:37 UTC (rev 4124)
+++ trunk/none/tests/amd64/smc1.c 2005-07-07 13:20:31 UTC (rev 4125)
@@ -0,0 +1,114 @@
+
+/* Test Valgrind's ability to spot writes to code which has been
+ translated, and discard the out-of-date translations.
+
+ CORRECT output is
+
+ in p 0
+ in q 1
+ in p 2
+ in q 3
+ in p 4
+ in q 5
+ in p 6
+ in q 7
+ in p 8
+ in q 9
+
+ WRONG output (if you fail to spot code-writes to code[0 .. 4]) is
+
+ in p 0
+ in p 1
+ in p 2
+ in p 3
+ in p 4
+ in p 5
+ in p 6
+ in p 7
+ in p 8
+ in p 9
+*/
+
+#include <stdio.h>
+#include <assert.h>
+#include <malloc.h>
+
+typedef unsigned long long int Addr;
+typedef unsigned char UChar;
+
+void q ( int n )
+{
+ printf("in q %d\n", n);
+}
+
+void p ( int n )
+{
+ printf("in p %d\n", n);
+}
+
+// Unlike on x86, data areas aren't executable; have to put
+// code on the heap therefore
+static UChar* code;
+
+/* Make `code' be movabsq $dest, %rax ; pushq %rax ; ret */
+// This forces the branch onwards to be indirect, so vex can't chase it
+void set_dest ( Addr dest )
+{
+ assert(sizeof(Addr) =3D=3D 8);
+
+ /* movabsq $imm64, %rax */
+ code[0] =3D 0x48;
+ code[1] =3D 0xB8;
+ code[2] =3D (dest & 0xFF);
+ code[3] =3D ((dest >> 8) & 0xFF);
+ code[4] =3D ((dest >> 16) & 0xFF);
+ code[5] =3D ((dest >> 24) & 0xFF);
+ code[6] =3D ((dest >> 32) & 0xFF);
+ code[7] =3D ((dest >> 40) & 0xFF);
+ code[8] =3D ((dest >> 48) & 0xFF);
+ code[9] =3D ((dest >> 56) & 0xFF);
+
+ /* pushq %rax */
+ code[10] =3D 0x50;
+
+ /* ret */
+ code[11] =3D 0xC3;
+}
+
+/* Calling aa gets eventually to the function residing in code[0..].
+ This indirection is necessary to defeat Vex's basic-block chasing
+ optimisation. That will merge up to three basic blocks into the
+ same IR superblock, which causes the test to succeed when it
+ shouldn't if main calls code[] directly. */
+
+// force an indirect branch to code[0], so vex can't chase it
+__attribute__((noinline))
+void dd ( int x, void (*f)(int) ) { f(x); }
+
+__attribute__((noinline))
+void cc ( int x ) { dd(x, (void(*)(int)) &code[0]); }
+
+__attribute__((noinline))
+void bb ( int x ) { cc(x); }
+
+__attribute__((noinline))
+void aa ( int x ) { bb(x); }
+
+__attribute__((noinline))
+void diversion ( void ) { }
+
+int main ( void )
+{
+ int i;
+ code =3D malloc(20);
+ assert(code);
+ for (i =3D 0; i < 10; i +=3D 2) {
+ set_dest ( (Addr)&p );
+ // diversion();
+ aa(i);
+ set_dest ( (Addr)&q );
+ // diversion();
+ aa(i+1);
+ }
+ return 0;
+}
Added: trunk/none/tests/amd64/smc1.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/amd64/smc1.stderr.exp 2005-07-07 11:32:37 UTC (rev 4=
124)
+++ trunk/none/tests/amd64/smc1.stderr.exp 2005-07-07 13:20:31 UTC (rev 4=
125)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/amd64/smc1.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/amd64/smc1.stdout.exp 2005-07-07 11:32:37 UTC (rev 4=
124)
+++ trunk/none/tests/amd64/smc1.stdout.exp 2005-07-07 13:20:31 UTC (rev 4=
125)
@@ -0,0 +1,10 @@
+in p 0
+in q 1
+in p 2
+in q 3
+in p 4
+in q 5
+in p 6
+in q 7
+in p 8
+in q 9
Added: trunk/none/tests/amd64/smc1.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/amd64/smc1.vgtest 2005-07-07 11:32:37 UTC (rev 4124)
+++ trunk/none/tests/amd64/smc1.vgtest 2005-07-07 13:20:31 UTC (rev 4125)
@@ -0,0 +1,2 @@
+prog: smc1
+vgopts: --smc-support=3Dall
|
|
From: <sv...@va...> - 2005-07-07 13:12:07
|
Author: sewardj
Date: 2005-07-07 14:12:04 +0100 (Thu, 07 Jul 2005)
New Revision: 1265
Log:
Fix bits and pieces needed to make self-checking-translations work
on amd64.
Modified:
trunk/priv/guest-generic/bb_to_IR.c
trunk/priv/host-amd64/hdefs.c
trunk/priv/host-amd64/isel.c
Modified: trunk/priv/guest-generic/bb_to_IR.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/priv/guest-generic/bb_to_IR.c 2005-07-07 12:26:36 UTC (rev 1264=
)
+++ trunk/priv/guest-generic/bb_to_IR.c 2005-07-07 13:12:04 UTC (rev 1265=
)
@@ -43,7 +43,7 @@
=20
/* Forwards .. */
__attribute((regparm(2)))
-static UInt genericg_compute_adler32 ( HWord addr, UInt len );
+static UInt genericg_compute_adler32 ( HWord addr, HWord len );
=20
=20
/* Disassemble a complete basic block, starting at guest_IP_start,=20
@@ -336,7 +336,7 @@
&genericg_compute_adler32,
mkIRExprVec_2(=20
mkIRExpr_HWord( (HWord)guest_code ),=20
- IRExpr_Const(IRConst_U32(len2check))
+ mkIRExpr_HWord( (HWord)len2check )
)
),
IRExpr_Const(IRConst_U32(adler32))
@@ -365,7 +365,7 @@
once for every use of a self-checking translation, so it needs to
be as fast as possible. */
__attribute((regparm(2)))
-static UInt genericg_compute_adler32 ( HWord addr, UInt len )
+static UInt genericg_compute_adler32 ( HWord addr, HWord len )
{
UInt s1 =3D 1;
UInt s2 =3D 0;
Modified: trunk/priv/host-amd64/hdefs.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/priv/host-amd64/hdefs.c 2005-07-07 12:26:36 UTC (rev 1264)
+++ trunk/priv/host-amd64/hdefs.c 2005-07-07 13:12:04 UTC (rev 1265)
@@ -2589,6 +2589,9 @@
case Ijk_NoDecode:
*p++ =3D 0xBD;
p =3D emit32(p, VEX_TRC_JMP_NODECODE); break;
+ case Ijk_TInval:
+ *p++ =3D 0xBD;
+ p =3D emit32(p, VEX_TRC_JMP_TINVAL); break;
case Ijk_Ret:
case Ijk_Call:
case Ijk_Boring:
Modified: trunk/priv/host-amd64/isel.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/priv/host-amd64/isel.c 2005-07-07 12:26:36 UTC (rev 1264)
+++ trunk/priv/host-amd64/isel.c 2005-07-07 13:12:04 UTC (rev 1265)
@@ -1576,14 +1576,20 @@
vassert(ty =3D=3D e->Iex.CCall.retty);
=20
/* be very restrictive for now. Only 64-bit ints allowed
- for args, and 64 bits for return type. */
- if (e->Iex.CCall.retty !=3D Ity_I64)
+ for args, and 64 or 32 bits for return type. */
+ if (e->Iex.CCall.retty !=3D Ity_I64 && e->Iex.CCall.retty !=3D Ity=
_I32)
goto irreducible;
=20
/* Marshal args, do the call. */
doHelperCall( env, False, NULL, e->Iex.CCall.cee, e->Iex.CCall.arg=
s );
=20
- addInstr(env, mk_iMOVsd_RR(hregAMD64_RAX(), dst));
+ /* Move to dst, and zero out the top 32 bits if the result type is
+ Ity_I32. Probably overkill, but still .. */
+ if (e->Iex.CCall.retty =3D=3D Ity_I64)
+ addInstr(env, mk_iMOVsd_RR(hregAMD64_RAX(), dst));
+ else
+ addInstr(env, AMD64Instr_MovZLQ(hregAMD64_RAX(), dst));
+
return dst;
}
=20
|
|
From: <sv...@va...> - 2005-07-07 12:27:35
|
Author: sewardj
Date: 2005-07-07 13:26:36 +0100 (Thu, 07 Jul 2005)
New Revision: 1264
Log:
Tidy up some loose ends in the self-checking-translations machinery,
and unroll the adler32 loop in a not-very-successful attempt to reduce
the overhead of checking.
Modified:
trunk/priv/guest-amd64/ghelpers.c
trunk/priv/guest-generic/bb_to_IR.c
trunk/priv/guest-x86/ghelpers.c
trunk/pub/libvex.h
Modified: trunk/priv/guest-amd64/ghelpers.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/priv/guest-amd64/ghelpers.c 2005-07-07 09:56:24 UTC (rev 1263)
+++ trunk/priv/guest-amd64/ghelpers.c 2005-07-07 12:26:36 UTC (rev 1264)
@@ -1729,7 +1729,7 @@
=20
/* Describe any sections to be regarded by Memcheck as
'always-defined'. */
- .n_alwaysDefd =3D 12,
+ .n_alwaysDefd =3D 14,
=20
/* flags thunk: OP and NDEP are always defd, whereas DEP1
and DEP2 have to be tracked. See detailed comment in
@@ -1754,7 +1754,9 @@
// /* */ ALWAYSDEFD(guest_LDT),
// /* */ ALWAYSDEFD(guest_GDT),
/* 10 */ ALWAYSDEFD(guest_EMWARN),
- /* 11 */ ALWAYSDEFD(guest_SSEROUND)
+ /* 11 */ ALWAYSDEFD(guest_SSEROUND),
+ /* 12 */ ALWAYSDEFD(guest_TISTART),
+ /* 13 */ ALWAYSDEFD(guest_TILEN)
}
};
=20
Modified: trunk/priv/guest-generic/bb_to_IR.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/priv/guest-generic/bb_to_IR.c 2005-07-07 09:56:24 UTC (rev 1263=
)
+++ trunk/priv/guest-generic/bb_to_IR.c 2005-07-07 12:26:36 UTC (rev 1264=
)
@@ -42,6 +42,7 @@
=20
=20
/* Forwards .. */
+__attribute((regparm(2)))
static UInt genericg_compute_adler32 ( HWord addr, UInt len );
=20
=20
@@ -119,7 +120,7 @@
delta =3D 0;
n_instrs =3D 0;
=20
- /* If asked to make a self-checking translation, leave a 3 spaces
+ /* If asked to make a self-checking translation, leave a 5 spaces
in which to put the check statements. We'll fill them in later
when we know the length and adler32 of the area to check. */
if (do_self_check) {
@@ -127,6 +128,8 @@
addStmtToIRBB( irbb, IRStmt_NoOp() );
addStmtToIRBB( irbb, IRStmt_NoOp() );
addStmtToIRBB( irbb, IRStmt_NoOp() );
+ addStmtToIRBB( irbb, IRStmt_NoOp() );
+ addStmtToIRBB( irbb, IRStmt_NoOp() );
}
=20
/* Process instructions. */
@@ -285,6 +288,7 @@
=20
UInt len2check, adler32;
IRConst* guest_IP_bbstart_IRConst;
+ IRTemp tistart_tmp, tilen_tmp;
=20
vassert(vge->n_used =3D=3D 1);
len2check =3D vge->len[0];
@@ -295,29 +299,39 @@
=20
guest_IP_bbstart_IRConst
=3D guest_word_type=3D=3DIty_I32=20
- ? IRConst_U32(guest_IP_bbstart)
+ ? IRConst_U32(toUInt(guest_IP_bbstart))
: IRConst_U64(guest_IP_bbstart);
=20
/* Set TISTART and TILEN. These will describe to the despatcher
the area of guest code to invalidate should we exit with a
self-check failure. */
=20
+ tistart_tmp =3D newIRTemp(irbb->tyenv, guest_word_type);
+ tilen_tmp =3D newIRTemp(irbb->tyenv, guest_word_type);
+
irbb->stmts[selfcheck_idx+0]
- =3D IRStmt_Put( offB_TILEN,=20
- guest_word_type=3D=3DIty_I32=20
- ? IRExpr_Const(IRConst_U32(len2check))=20
- : IRExpr_Const(IRConst_U64(len2check)) );
+ =3D IRStmt_Tmp(tistart_tmp, IRExpr_Const(guest_IP_bbstart_IRCons=
t) );
=20
irbb->stmts[selfcheck_idx+1]
- =3D IRStmt_Put( offB_TISTART, IRExpr_Const(guest_IP_bbstart_IRCo=
nst) );
+ =3D IRStmt_Tmp(tilen_tmp,
+ guest_word_type=3D=3DIty_I32=20
+ ? IRExpr_Const(IRConst_U32(len2check))=20
+ : IRExpr_Const(IRConst_U64(len2check))
+ );
=20
irbb->stmts[selfcheck_idx+2]
+ =3D IRStmt_Put( offB_TISTART, IRExpr_Tmp(tistart_tmp) );
+
+ irbb->stmts[selfcheck_idx+3]
+ =3D IRStmt_Put( offB_TILEN, IRExpr_Tmp(tilen_tmp) );
+
+ irbb->stmts[selfcheck_idx+4]
=3D IRStmt_Exit(=20
IRExpr_Binop(=20
Iop_CmpNE32,=20
mkIRExprCCall(=20
Ity_I32,=20
- 0/*regparms*/,=20
+ 2/*regparms*/,=20
"genericg_compute_adler32",
&genericg_compute_adler32,
mkIRExprVec_2(=20
@@ -350,17 +364,12 @@
get anywhere near that many bytes to deal with. This fn is called
once for every use of a self-checking translation, so it needs to
be as fast as possible. */
+__attribute((regparm(2)))
static UInt genericg_compute_adler32 ( HWord addr, UInt len )
{
- UInt i;
UInt s1 =3D 1;
UInt s2 =3D 0;
UChar* buf =3D (UChar*)addr;
- for (i =3D 0; i < len; i++) {
- s1 +=3D (UInt)buf[i];
- s2 +=3D s1;
- }
-#if 0
while (len >=3D 4) {
s1 +=3D buf[0];
s2 +=3D s1;
@@ -379,7 +388,6 @@
len--;
buf++;
}
-#endif
return (s2 << 16) + s1;
}
=20
Modified: trunk/priv/guest-x86/ghelpers.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/priv/guest-x86/ghelpers.c 2005-07-07 09:56:24 UTC (rev 1263)
+++ trunk/priv/guest-x86/ghelpers.c 2005-07-07 12:26:36 UTC (rev 1264)
@@ -2061,7 +2061,7 @@
=20
/* Describe any sections to be regarded by Memcheck as
'always-defined'. */
- .n_alwaysDefd =3D 19,
+ .n_alwaysDefd =3D 21,
=20
/* flags thunk: OP and NDEP are always defd, whereas DEP1
and DEP2 have to be tracked. See detailed comment in
@@ -2085,7 +2085,9 @@
/* 15 */ ALWAYSDEFD(guest_LDT),
/* 16 */ ALWAYSDEFD(guest_GDT),
/* 17 */ ALWAYSDEFD(guest_EMWARN),
- /* 18 */ ALWAYSDEFD(guest_SSEROUND)
+ /* 18 */ ALWAYSDEFD(guest_SSEROUND),
+ /* 19 */ ALWAYSDEFD(guest_TISTART),
+ /* 20 */ ALWAYSDEFD(guest_TILEN)
}
};
=20
Modified: trunk/pub/libvex.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/pub/libvex.h 2005-07-07 09:56:24 UTC (rev 1263)
+++ trunk/pub/libvex.h 2005-07-07 12:26:36 UTC (rev 1264)
@@ -171,7 +171,7 @@
=20
/* The max number of guest state chunks which we can describe as
always defined (for the benefit of Memcheck). */
-#define VEXGLO_N_ALWAYSDEFD 19
+#define VEXGLO_N_ALWAYSDEFD 21
=20
typedef
struct {
|
|
From: <sv...@va...> - 2005-07-07 11:33:28
|
Author: sewardj
Date: 2005-07-07 12:32:37 +0100 (Thu, 07 Jul 2005)
New Revision: 4124
Log:
Update expected output.
Modified:
trunk/none/tests/cmdline1.stdout.exp
trunk/none/tests/cmdline2.stdout.exp
Modified: trunk/none/tests/cmdline1.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/cmdline1.stdout.exp 2005-07-07 11:24:14 UTC (rev 412=
3)
+++ trunk/none/tests/cmdline1.stdout.exp 2005-07-07 11:32:37 UTC (rev 412=
4)
@@ -18,6 +18,8 @@
--pointercheck=3Dno|yes enforce client address space limits [yes=
]
--support-elan3=3Dno|yes hacks for Quadrics Elan3 support [no]
--show-emwarns=3Dno|yes show warnings about emulation limits? [n=
o]
+ --smc-support=3Dnone|stack|all support for self-modifying code:
+ none, for code found in stacks, or all [st=
ack]
=20
user options for Valgrind tools that report errors:
--log-fd=3D<number> log messages to file descriptor [2=3Dstd=
err]
Modified: trunk/none/tests/cmdline2.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/cmdline2.stdout.exp 2005-07-07 11:24:14 UTC (rev 412=
3)
+++ trunk/none/tests/cmdline2.stdout.exp 2005-07-07 11:32:37 UTC (rev 412=
4)
@@ -18,6 +18,8 @@
--pointercheck=3Dno|yes enforce client address space limits [yes=
]
--support-elan3=3Dno|yes hacks for Quadrics Elan3 support [no]
--show-emwarns=3Dno|yes show warnings about emulation limits? [n=
o]
+ --smc-support=3Dnone|stack|all support for self-modifying code:
+ none, for code found in stacks, or all [st=
ack]
=20
user options for Valgrind tools that report errors:
--log-fd=3D<number> log messages to file descriptor [2=3Dstd=
err]
|
|
From: Julian S. <js...@ac...> - 2005-07-07 11:28:38
|
> --smc-support=stack (the default). I will now start running systematic > tests on a wide range of code. Good. Please keep us informed of the results. If you have an amd64 platform to test on, that also would be helpful. > I owe you a beer. In fact I owe you many beers! These are difficult to send by email :-) What would be appreciated is a regression test in C, one that fails with --smc-support=none but succeeds with --smc-support=stack. Any chance? J |
|
From: <sv...@va...> - 2005-07-07 11:24:19
|
Author: sewardj
Date: 2005-07-07 12:24:14 +0100 (Thu, 07 Jul 2005)
New Revision: 4123
Log:
Modify this test so it no longer uses client requests, but instead
relies on --smc-support=3Dall to work correctly. Hence it tests the
s-m-c support at least on x86. Jump through various hoops to defeat
vex's basic-block-chasing optimisation, which has an annoying habit of
making this test work correctly even without --smc-support=3Dall.
Modified:
trunk/none/tests/x86/smc1.c
trunk/none/tests/x86/smc1.vgtest
Modified: trunk/none/tests/x86/smc1.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/none/tests/x86/smc1.c 2005-07-07 10:05:05 UTC (rev 4122)
+++ trunk/none/tests/x86/smc1.c 2005-07-07 11:24:14 UTC (rev 4123)
@@ -1,5 +1,5 @@
=20
-/* Test Heimdall's ability to spot writes to code which has been
+/* Test Valgrind's ability to spot writes to code which has been
translated, and discard the out-of-date translations.
=20
CORRECT output is
@@ -30,7 +30,6 @@
*/
=20
#include <stdio.h>
-#include "valgrind.h"
=20
typedef unsigned int Addr;
typedef unsigned char UChar;
@@ -45,33 +44,52 @@
printf("in p %d\n", n);
}
=20
-UChar code[10];
+static UChar code[10];
=20
-/* Make `code' be JMP-32 dest */
+/* Make `code' be PUSHL $dest ; ret */
+// This forces the branch onwards to be indirect, so vex can't chase it
void set_dest ( Addr dest )
{
- unsigned int delta;
- delta =3D dest - ((Addr)(&code[0]));
- delta -=3D 5;
- =20
- code[0] =3D 0xE9; /* JMP d32 */
- code[1] =3D (delta & 0xFF);
- code[2] =3D ((delta >> 8) & 0xFF);
- code[3] =3D ((delta >> 16) & 0xFF);
- code[4] =3D ((delta >> 24) & 0xFF);
-
- /* XXX this should be automatic */
- VALGRIND_DISCARD_TRANSLATIONS(code, sizeof(code));
+ code[0] =3D 0x68; /* PUSH imm32 */
+ code[1] =3D (dest & 0xFF);
+ code[2] =3D ((dest >> 8) & 0xFF);
+ code[3] =3D ((dest >> 16) & 0xFF);
+ code[4] =3D ((dest >> 24) & 0xFF);
+ code[5] =3D 0xC3;
}
=20
+/* Calling aa gets eventually to the function residing in code[0..].
+ This indirection is necessary to defeat Vex's basic-block chasing
+ optimisation. That will merge up to three basic blocks into the
+ same IR superblock, which causes the test to succeed when it
+ shouldn't if main calls code[] directly. */
+
+// force an indirect branch to code[0], so vex can't chase it
+__attribute__((noinline))
+void dd ( int x, void (*f)(int) ) { f(x); }
+
+__attribute__((noinline))
+void cc ( int x ) { dd(x, (void(*)(int)) &code[0]); }
+
+__attribute__((noinline))
+void bb ( int x ) { cc(x); }
+
+__attribute__((noinline))
+void aa ( int x ) { bb(x); }
+
+__attribute__((noinline))
+void diversion ( void ) { }
+
int main ( void )
{
int i;
for (i =3D 0; i < 10; i +=3D 2) {
set_dest ( (Addr)&p );
- ( (void (*)(int)) (&code[0]) ) (i);
+ // diversion();
+ aa(i);
set_dest ( (Addr)&q );
- ( (void (*)(int)) (&code[0]) ) (i+1);
+ // diversion();
+ aa(i+1);
}
return 0;
}
Modified: trunk/none/tests/x86/smc1.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/none/tests/x86/smc1.vgtest 2005-07-07 10:05:05 UTC (rev 4122)
+++ trunk/none/tests/x86/smc1.vgtest 2005-07-07 11:24:14 UTC (rev 4123)
@@ -1 +1,2 @@
prog: smc1
+vgopts: --smc-support=3Dall
|
|
From: Duncan S. <dun...@ma...> - 2005-07-07 11:06:53
|
> Support for self modifying code on unfriendly platforms (x86, amd64) > via the use of self-checking translations. (Friendly platforms which > have icache-invalidation instructions we can observe, such as ppc32, > are already handled correctly.) This should finally fix the > longstanding problem of V incorrectly handling calls of statically > nested functions (a gcc extension), and more generally make it a lot > easier to use V to debug dynamic code generation systems. I am comparing results with --smc-support=stack vs --smc-support=none. So far, it works wonderfully! Initial tests on programs that explode and die with --smc-support=none run to completion without problems with --smc-support=stack (the default). I will now start running systematic tests on a wide range of code. I owe you a beer. In fact I owe you many beers! Many thanks! Duncan. |
|
From: <sv...@va...> - 2005-07-07 10:05:31
|
Author: sewardj
Date: 2005-07-07 11:05:05 +0100 (Thu, 07 Jul 2005)
New Revision: 4122
Log:
Support for self modifying code on unfriendly platforms (x86, amd64)
via the use of self-checking translations. (Friendly platforms which
have icache-invalidation instructions we can observe, such as ppc32,
are already handled correctly.) This should finally fix the
longstanding problem of V incorrectly handling calls of statically
nested functions (a gcc extension), and more generally make it a lot
easier to use V to debug dynamic code generation systems.
Since self-checking is a large performance overhead, there is some
control via a command line flag:
--smc-support=3Dnone=20
Don't make any translations self-checking.
--smc-support=3Dstack
Add checking code for translations taken from segments which
have the SF_GROWDOWN flag set -- stacks, basically.
This is the default. It should make gcc nested functions and
GNU Ada work correctly with no intervention from the user.
--smc-support=3Dall
Make all translations self-checking. This is expensive and=20
you want to do this if you're debugging a JIT compiler or
some such.
Modified:
trunk/coregrind/m_main.c
trunk/coregrind/m_options.c
trunk/coregrind/m_translate.c
trunk/coregrind/m_transtab.c
trunk/coregrind/pub_core_options.h
trunk/coregrind/pub_core_transtab.h
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-07-07 08:22:51 UTC (rev 4121)
+++ trunk/coregrind/m_main.c 2005-07-07 10:05:05 UTC (rev 4122)
@@ -1268,6 +1268,8 @@
" --pointercheck=3Dno|yes enforce client address space limits [ye=
s]\n"
" --support-elan3=3Dno|yes hacks for Quadrics Elan3 support [no]\n=
"
" --show-emwarns=3Dno|yes show warnings about emulation limits? [=
no]\n"
+" --smc-support=3Dnone|stack|all support for self-modifying code:\n=
"
+" none, for code found in stacks, or all [s=
tack]\n"
"\n"
" user options for Valgrind tools that report errors:\n"
" --log-fd=3D<number> log messages to file descriptor [2=3Dst=
derr]\n"
@@ -1501,6 +1503,13 @@
else VG_BNUM_CLO(arg, "--num-callers", VG_(clo_backtrace_size=
), 1,
VG_DEEPEST_BACKTRACE)
=20
+ else if (VG_CLO_STREQ(arg, "--smc-support=3Dnone"))
+ VG_(clo_smc_support) =3D Vg_SmcNone;
+ else if (VG_CLO_STREQ(arg, "--smc-support=3Dstack"))
+ VG_(clo_smc_support) =3D Vg_SmcStack;
+ else if (VG_CLO_STREQ(arg, "--smc-support=3Dall"))
+ VG_(clo_smc_support) =3D Vg_SmcAll;
+
else VG_BNUM_CLO(arg, "--vex-iropt-verbosity",
VG_(clo_vex_control).iropt_verbosity, 0, 10)
else VG_BNUM_CLO(arg, "--vex-iropt-level",
Modified: trunk/coregrind/m_options.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_options.c 2005-07-07 08:22:51 UTC (rev 4121)
+++ trunk/coregrind/m_options.c 2005-07-07 10:05:05 UTC (rev 4122)
@@ -76,8 +76,9 @@
Bool VG_(clo_show_emwarns) =3D False;
Int VG_(clo_max_stackframe) =3D 2000000;
Bool VG_(clo_wait_for_gdb) =3D False;
+VgSmc VG_(clo_smc_support) =3D Vg_SmcStack;
=20
+
/*--------------------------------------------------------------------*/
/*--- end m_options.c ---*/
/*--------------------------------------------------------------------*/
-
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-07-07 08:22:51 UTC (rev 4121)
+++ trunk/coregrind/m_translate.c 2005-07-07 10:05:05 UTC (rev 4122)
@@ -400,7 +400,7 @@
{
Addr64 redir, orig_addr0 =3D orig_addr;
Int tmpbuf_used, verbosity;
- Bool notrace_until_done;
+ Bool notrace_until_done, do_self_check;
UInt notrace_until_limit =3D 0;
Segment* seg;
VexGuestExtents vge;
@@ -503,6 +503,17 @@
} else
seg->flags |=3D SF_CODE; /* contains cached code */
=20
+ /* Do we want a self-checking translation? */
+ do_self_check =3D False;
+ switch (VG_(clo_smc_support)) {
+ case Vg_SmcNone: do_self_check =3D False; break;
+ case Vg_SmcAll: do_self_check =3D True; break;
+ case Vg_SmcStack:=20
+ do_self_check =3D seg ? toBool(seg->flags & SF_GROWDOWN) : Fals=
e;
+ break;
+ default: vg_assert2(0, "unknown VG_(clo_smc_support) value");
+ }
+
/* True if a debug trans., or if bit N set in VG_(clo_trace_codegen).=
*/
verbosity =3D 0;
if (debugging_translation) {
@@ -532,6 +543,7 @@
? vg_SP_update_pass
: NULL,
True, /* cleanup after instrumentation */
+ do_self_check,
NULL,
verbosity
);
@@ -555,7 +567,8 @@
VG_(add_to_transtab)( &vge,
orig_addr0,
(Addr)(&tmpbuf[0]),=20
- tmpbuf_used );
+ tmpbuf_used,
+ do_self_check );
}
=20
VGP_POPCC(VgpTranslate);
Modified: trunk/coregrind/m_transtab.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_transtab.c 2005-07-07 08:22:51 UTC (rev 4121)
+++ trunk/coregrind/m_transtab.c 2005-07-07 10:05:05 UTC (rev 4122)
@@ -225,10 +225,12 @@
ULong n_full_lookups =3D 0;
ULong n_lookup_probes =3D 0;
=20
-/* Number/osize/tsize of translations entered. */
-ULong n_in_count =3D 0;
-ULong n_in_osize =3D 0;
-ULong n_in_tsize =3D 0;
+/* Number/osize/tsize of translations entered; also the number of
+ those for which self-checking was requested. */
+ULong n_in_count =3D 0;
+ULong n_in_osize =3D 0;
+ULong n_in_tsize =3D 0;
+ULong n_in_sc_count =3D 0;
=20
/* Number/osize of translations discarded due to lack of space. */
ULong n_dump_count =3D 0;
@@ -365,7 +367,8 @@
void VG_(add_to_transtab)( VexGuestExtents* vge,
Addr64 entry,
AddrH code,
- UInt code_len )
+ UInt code_len,
+ Bool is_self_checking )
{
Int tcAvailQ, reqdQ, y, i;
ULong *tce, *tce2;
@@ -383,6 +386,8 @@
n_in_count++;
n_in_tsize +=3D code_len;
n_in_osize +=3D vge_osize(vge);
+ if (is_self_checking)
+ n_in_sc_count++;
=20
y =3D youngest_sector;
vg_assert(isValidSector(y));
@@ -663,9 +668,11 @@
n_fast_updates, n_fast_flushes );
=20
VG_(message)(Vg_DebugMsg,
- "translate: new %lld (%lld -> %lld; ratio %lld:10=
)",
+ "translate: new %lld "
+ "(%lld -> %lld; ratio %lld:10) [%lld scs]",
n_in_count, n_in_osize, n_in_tsize,
- safe_idiv(10*n_in_tsize, n_in_osize));
+ safe_idiv(10*n_in_tsize, n_in_osize),
+ n_in_sc_count);
VG_(message)(Vg_DebugMsg,
"translate: dumped %lld (%lld -> ?" "?)",
n_dump_count, n_dump_osize );
Modified: trunk/coregrind/pub_core_options.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/pub_core_options.h 2005-07-07 08:22:51 UTC (rev 4121)
+++ trunk/coregrind/pub_core_options.h 2005-07-07 10:05:05 UTC (rev 4122)
@@ -151,6 +151,22 @@
/* Delay startup to allow GDB to be attached? Default: NO */
extern Bool VG_(clo_wait_for_gdb);
=20
+/* To what extent should self-checking translations be made? These
+ are needed to deal with self-modifying code on uncooperative
+ platforms. */
+typedef=20
+ enum {=20
+ Vg_SmcNone, // never generate self-checking translations
+ Vg_SmcStack, // generate s-c-t's for code found in stacks
+ // (segments with SF_GROWDOWN, to be precise)
+ // (this is the default)
+ Vg_SmcAll // make all translations self-checking.
+ }=20
+ VgSmc;
+
+extern VgSmc VG_(clo_smc_support);
+
+
#endif // __PUB_CORE_OPTIONS_H
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/pub_core_transtab.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/pub_core_transtab.h 2005-07-07 08:22:51 UTC (rev 4121=
)
+++ trunk/coregrind/pub_core_transtab.h 2005-07-07 10:05:05 UTC (rev 4122=
)
@@ -49,7 +49,8 @@
void VG_(add_to_transtab)( VexGuestExtents* vge,
Addr64 entry,
AddrH code,
- UInt code_len );
+ UInt code_len,
+ Bool is_self_checking );
=20
extern Bool VG_(search_transtab) ( /*OUT*/AddrH* result,
Addr64 guest_addr,=20
|
|
From: <sv...@va...> - 2005-07-07 09:56:27
|
Author: sewardj
Date: 2005-07-07 10:56:24 +0100 (Thu, 07 Jul 2005)
New Revision: 1263
Log:
Make LibVEX_Translate (an API fn) take a Bool indicating whether or
not a self-checking translation has been requested.
Modified:
trunk/priv/main/vex_main.c
trunk/pub/libvex.h
trunk/test_main.c
Modified: trunk/priv/main/vex_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/priv/main/vex_main.c 2005-07-07 01:32:16 UTC (rev 1262)
+++ trunk/priv/main/vex_main.c 2005-07-07 09:56:24 UTC (rev 1263)
@@ -190,6 +190,8 @@
IRBB* (*instrument2) ( IRBB*, VexGuestLayout*,=20
IRType gWordTy, IRType hWordTy ),
Bool cleanup_after_instrumentation,
+ /* IN: should this translation be self-checking? */
+ Bool do_self_check,
/* IN: optionally, an access check function for guest code. */
Bool (*byte_accessible) ( Addr64 ),
/* IN: debug: trace vex activity at various points */
@@ -400,7 +402,7 @@
host_is_bigendian,
archinfo_guest,
guest_word_type,
- False/*selfcheck*/,
+ do_self_check,
offB_TISTART,
offB_TILEN );
=20
Modified: trunk/pub/libvex.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/pub/libvex.h 2005-07-07 01:32:16 UTC (rev 1262)
+++ trunk/pub/libvex.h 2005-07-07 09:56:24 UTC (rev 1263)
@@ -286,6 +286,8 @@
IRBB* (*instrument2) ( IRBB*, VexGuestLayout*,=20
IRType gWordTy, IRType hWordTy ),
Bool cleanup_after_instrumentation,
+ /* IN: should this translation be self-checking? */
+ Bool do_self_check,
/* IN: optionally, an access check function for guest code. */
Bool (*byte_accessible) ( Addr64 ),
/* IN: debug: trace vex activity at various points */
Modified: trunk/test_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/test_main.c 2005-07-07 01:32:16 UTC (rev 1262)
+++ trunk/test_main.c 2005-07-07 09:56:24 UTC (rev 1263)
@@ -166,6 +166,7 @@
NULL, /* instrument2 */
True, /* cleanup after instrument */
#endif
+ False, /* do_self_check ? */
NULL, /* access checker */
TEST_FLAGS=20
);
|
|
From: <sv...@va...> - 2005-07-07 08:23:30
|
Author: sewardj
Date: 2005-07-07 09:22:51 +0100 (Thu, 07 Jul 2005)
New Revision: 4121
Log:
rm unused code
Modified:
trunk/coregrind/m_translate.c
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-07-06 20:22:16 UTC (rev 4120)
+++ trunk/coregrind/m_translate.c 2005-07-07 08:22:51 UTC (rev 4121)
@@ -339,42 +339,6 @@
}
=20
=20
-
-#if 0
- for (i =3D 0; i < bb_in->stmts_used; i++) {
- st =3D bb_in->stmts[i];
- if (!st)
- continue;
- if (st->tag !=3D Ist_Put)=20
- goto boring;
- offP =3D st->Ist.Put.offset;
- if (offP !=3D layout->offset_SP)=20
- goto boring;
- szP =3D sizeofIRType(typeOfIRExpr(bb_in->tyenv, st->Ist.Put.data))=
;
- if (szP !=3D layout->sizeof_SP)
- goto boring;
- vg_assert(isAtom(st->Ist.Put.data));
-
- /* I don't know if it's really necessary to say that the call read=
s
- the stack pointer. But anyway, we do. */ =20
- dcall =3D unsafeIRDirty_0_N(=20
- mkIRCallee(1, "VG_(unknown_esp_update)",=20
- (HWord)&VG_(unknown_esp_update)),
- mkIRExprVec_1(st->Ist.Put.data)=20
- );
- dcall->nFxState =3D 1;
- dcall->fxState[0].fx =3D Ifx_Read;
- dcall->fxState[0].offset =3D layout->offset_SP;
- dcall->fxState[0].size =3D layout->sizeof_SP;
-
- addStmtToIRBB( bb, IRStmt_Dirty(dcall) );
-
- boring:
- addStmtToIRBB( bb, st );
- }
-#endif
-
-
/*------------------------------------------------------------*/
/*--- Main entry point for the JITter. ---*/
/*------------------------------------------------------------*/
|
|
From: Tom H. <th...@cy...> - 2005-07-07 03:02:16
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-07-07 03:25:03 BST 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 == 179 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/sigaltstack (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/pth_blockedsig (stderr) none/tests/pth_cancel1 (stdout) none/tests/pth_cancel1 (stderr) none/tests/pth_cancel2 (stderr) none/tests/x86/int (stderr) |
|
From: <js...@ac...> - 2005-07-07 02:40:56
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-07-07 03:30:00 BST 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 == 177 tests, 2 stderr failures, 0 stdout failures ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |