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
(36) |
2
(30) |
|
3
(17) |
4
(21) |
5
(18) |
6
(14) |
7
(23) |
8
(12) |
9
(11) |
|
10
(11) |
11
(12) |
12
(11) |
13
(12) |
14
(11) |
15
(11) |
16
(15) |
|
17
(12) |
18
(15) |
19
(15) |
20
(25) |
21
(26) |
22
(21) |
23
(18) |
|
24
(25) |
25
(28) |
26
(27) |
27
(32) |
28
(13) |
29
(12) |
30
(10) |
|
From: <sv...@va...> - 2005-04-30 18:47:54
|
Author: sewardj
Date: 2005-04-30 19:47:48 +0100 (Sat, 30 Apr 2005)
New Revision: 3582
Modified:
trunk/coregrind/core.h
trunk/coregrind/m_stacktrace.c
trunk/coregrind/pub_core_stacktrace.h
trunk/coregrind/vg_dwarf.c
trunk/coregrind/vg_main.c
trunk/coregrind/vg_mylibc.c
trunk/coregrind/vg_signals.c
trunk/coregrind/vg_symtab2.c
trunk/coregrind/vg_symtab2.h
Log:
Get the CFI-based frame-unwinder to the point where it works at least
for small examples on x86. Still messy, slow, amd64 specifics not
done, and non-null cie.augmentations are not handled.
Modified: trunk/coregrind/core.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/core.h 2005-04-30 07:55:58 UTC (rev 3581)
+++ trunk/coregrind/core.h 2005-04-30 18:47:48 UTC (rev 3582)
@@ -882,6 +882,13 @@
=20
extern Bool VG_(resolve_redir_allsegs)(CodeRedirect *redir);
=20
+extern Bool VG_(use_CFI_info) ( /*MOD*/Addr* ipP,
+ /*MOD*/Addr* spP,
+ /*MOD*/Addr* fpP,
+ Addr min_accessible,
+ Addr max_accessible );
+
+
/* ---------------------------------------------------------------------
Exports of vg_redir.c
------------------------------------------------------------------ */
Modified: trunk/coregrind/m_stacktrace.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_stacktrace.c 2005-04-30 07:55:58 UTC (rev 3581)
+++ trunk/coregrind/m_stacktrace.c 2005-04-30 18:47:48 UTC (rev 3582)
@@ -38,7 +38,8 @@
/* Take a snapshot of the client's stack, putting the up to 'n_ips' IPs=20
into 'ips'. In order to be thread-safe, we pass in the thread's IP
and FP. Returns number of IPs put in 'ips'. */
-UInt VG_(get_StackTrace2) ( Addr* ips, UInt n_ips, Addr ip, Addr fp,
+UInt VG_(get_StackTrace2) ( Addr* ips, UInt n_ips,=20
+ Addr ip, Addr sp, Addr fp,
Addr fp_min, Addr fp_max_orig )
{
static const Bool debug =3D False;
@@ -72,32 +73,57 @@
* offending stack traces only have one item. --njn, 2002-aug-16 */
/* vg_assert(fp_min <=3D fp_max);*/
=20
- if (fp_min + 4000000 <=3D fp_max) {
+ ips[0] =3D ip;
+ i =3D 1;
+
+ if (fp_min + VG_(clo_max_stackframe) <=3D fp_max) {
/* If the stack is ridiculously big, don't poke around ... but
don't bomb out either. Needed to make John Regehr's
user-space threads package work. JRS 20021001 */
- ips[0] =3D ip;
- i =3D 1;
} else {
- /* Get whatever we safely can ... */
- ips[0] =3D ip;
- fp =3D VGA_FIRST_STACK_FRAME(fp);
- for (i =3D 1; i < n_ips; i++) {
- if (!(fp_min <=3D fp && fp <=3D fp_max)) {
- if (debug)
- VG_(printf)("... out of range %p\n", fp);
- break; /* fp gone baaaad */
- }
- // NJN 2002-sep-17: monotonicity doesn't work -- gives wrong tr=
aces...
- // if (fp >=3D ((UInt*)fp)[0]) {
- // VG_(printf)("nonmonotonic\n");
- // break; /* fp gone nonmonotonic */
- // }
- ips[i] =3D VGA_STACK_FRAME_RET(fp); /* ret addr */
- fp =3D VGA_STACK_FRAME_NEXT(fp); /* old fp */
- if (debug)
- VG_(printf)(" ips[%d]=3D%08p\n", i, ips[i]);
+
+ while (True) {
+
+ if (i >=3D n_ips)
+ break;
+
+ /* Try to derive a new (ip,sp,fp) triple from the current
+ set. */
+
+ /* First off, see if there is any CFI info to hand which can
+ be used. */
+ if ( VG_(use_CFI_info)( &ip, &sp, &fp, fp_min, fp_max ) ) {
+ ips[i++] =3D ip;
+ if (debug)
+ VG_(printf)(" ipsC[%d]=3D%08p\n", i-1, ips[i-1]);
+ continue;
+ }
+
+ /* If VG_(use_CFI_info) fails, it won't modify ip/sp/fp, so
+ we can safely try the old-fashioned method. */
+ /* This bit is supposed to deal with frames resulting from
+ functions which begin "pushl% ebp ; movl %esp, %ebp" (x86)
+ or "pushl% ebp ; movl %esp, %ebp" (amd64). Unfortunately,
+ since we can't (easily) look at the insns at the start of
+ the fn, like GDB does, there's no reliable way to tell.
+ Hence the hack of first trying out CFI, and if that fails,
+ then use this as a fallback. */
+ if (fp_min <=3D fp && fp <=3D fp_max) {
+ /* fp looks sane, so use it. */
+ ip =3D VGA_STACK_FRAME_RET(fp);
+ sp =3D fp + sizeof(Addr) /*saved %ebp/%rbp*/=20
+ + sizeof(Addr) /*ra*/;
+ fp =3D VGA_STACK_FRAME_NEXT(fp);
+ ips[i++] =3D ip;
+ if (debug)
+ VG_(printf)(" ipsF[%d]=3D%08p\n", i-1, ips[i-1]);
+ continue;
+ }
+
+ /* No luck there. We have to give up. */
+ break;
}
+
}
n_found =3D i;
=20
@@ -139,7 +165,7 @@
VG_(printf)("tid %d: stack_highest=3D%p ip=3D%p sp=3D%p fp=3D%p\n"=
,
tid, stack_highest_word, ip, sp, fp);
=20
- return VG_(get_StackTrace2)(ips, n_ips, ip, fp, sp, stack_highest_wor=
d);
+ return VG_(get_StackTrace2)(ips, n_ips, ip, sp, fp, sp, stack_highest=
_word);
}
=20
static void printIpDesc(UInt n, Addr ip)
Modified: trunk/coregrind/pub_core_stacktrace.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_stacktrace.h 2005-04-30 07:55:58 UTC (rev 35=
81)
+++ trunk/coregrind/pub_core_stacktrace.h 2005-04-30 18:47:48 UTC (rev 35=
82)
@@ -39,8 +39,9 @@
#include "pub_tool_stacktrace.h"
=20
// Variant that gives a little more control over the stack-walking.
-extern UInt VG_(get_StackTrace2) ( StackTrace ips, UInt n_ips, Addr ip,
- Addr fp, Addr fp_min, Addr fp_max );
+extern UInt VG_(get_StackTrace2) ( StackTrace ips, UInt n_ips,=20
+ Addr ip, Addr sp, Addr fp,=20
+ Addr fp_min, Addr fp_max );
=20
#endif // __PUB_CORE_STACKTRACE_H
=20
Modified: trunk/coregrind/vg_dwarf.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/vg_dwarf.c 2005-04-30 07:55:58 UTC (rev 3581)
+++ trunk/coregrind/vg_dwarf.c 2005-04-30 18:47:48 UTC (rev 3582)
@@ -829,6 +829,87 @@
/*--- Read call-frame info from an .eh_frame section ---*/
/*------------------------------------------------------------*/
=20
+void VG_(ppCfiSI) ( CfiSI* si )
+{
+# define SHOW_HOW(_how, _off) \
+ do { \
+ if (_how =3D=3D CFIR_UNKNOWN) { \
+ VG_(printf)("Unknown"); \
+ } else \
+ if (_how =3D=3D CFIR_SAME) { \
+ VG_(printf)("Same"); \
+ } else \
+ if (_how =3D=3D CFIR_CFAREL) { \
+ VG_(printf)("cfa+%d", _off); \
+ } else \
+ if (_how =3D=3D CFIR_MEMCFAREL) { \
+ VG_(printf)("*(cfa+%d)", _off); \
+ } else { \
+ VG_(printf)("???"); \
+ } \
+ } while (0)
+
+ VG_(printf)("[%p .. %p]: ", si->base,=20
+ si->base + (UWord)si->len - 1);
+ VG_(printf)("let cfa=3D%s+%d",=20
+ si->cfa_sprel ? "oldSP" : "oldFP", si->cfa_off);
+ VG_(printf)(" in RA=3D");
+ SHOW_HOW(si->ra_how, si->ra_off);
+ VG_(printf)(" SP=3D");
+ SHOW_HOW(si->sp_how, si->sp_off);
+ VG_(printf)(" FP=3D");
+ SHOW_HOW(si->fp_how, si->fp_off);
+ VG_(printf)("\n");
+
+# undef SHOW_HOW
+}
+
+static void initCfiSI ( CfiSI* si )
+{
+ si->base =3D 0;
+ si->len =3D 0;
+ si->cfa_sprel =3D False;
+ si->ra_how =3D 0;
+ si->sp_how =3D 0;
+ si->fp_how =3D 0;
+ si->cfa_off =3D 0;
+ si->ra_off =3D 0;
+ si->sp_off =3D 0;
+ si->fp_off =3D 0;
+}
+
+
+/* Useful info ..
+
+ gdb-6.3/gdb/i386-tdep.c:
+
+ DWARF2/GCC uses the stack address *before* the function call as a
+ frame's CFA. [jrs: I presume this means %esp before the call as
+ the CFA].=20
+
+ JRS: on amd64, the dwarf register numbering is, as per
+ gdb-6.3/gdb/tdep-amd64.c and also amd64-abi-0.95.pdf:
+
+ 0 1 2 3 4 5 6 7
+ RAX RDX RCX RBX RSI RDI RBP RSP
+
+ 8 ... 15
+ R8 ... R15
+
+ 16 is the return address (RIP)
+
+ This is pretty strange given this not the encoding scheme for
+ registers used in amd64 code.
+
+ On x86 I cannot find any documentation. It _appears_ to be the
+ actual instruction encoding, viz:
+
+ 0 1 2 3 4 5 6 7
+ EAX ECX EDX EBX ESP EBP ESI EDI
+
+ 8 is the return address (EIP) */
+
+
/* the number of regs we are prepared to unwind */
#define N_CFI_REGS 20
=20
@@ -879,8 +960,9 @@
typedef
struct {
/* Read-only fields. */
- Int code_a_f;
- Int data_a_f;
+ Int code_a_f;
+ Int data_a_f;
+ Addr initloc;
/* The rest of these fields can be modifed by
run_CF_instruction. */
/* The LOC entry */
@@ -908,21 +990,113 @@
}
}
=20
+static void ppRegRule ( RegRule* reg )
+{
+ switch (reg->tag) {
+ case RR_Undef: VG_(printf)("u "); break;
+ case RR_Same: VG_(printf)("s "); break;
+ case RR_CFAoff: VG_(printf)("c%d ", reg->coff); break;
+ case RR_Reg: VG_(printf)("r%d ", reg->reg); break;
+ case RR_Arch: VG_(printf)("a "); break;
+ default: VG_(core_panic)("ppRegRule");
+ }
+}
+
+
static void ppUnwindContext ( UnwindContext* ctx )
{
Int i;
VG_(printf)("0x%llx: ", (ULong)ctx->loc);
VG_(printf)("%d(r%d) ", ctx->cfa_offset, ctx->cfa_reg);
- for (i =3D 0; i < N_CFI_REGS; i++) {
- switch (ctx->reg[i].tag) {
- case RR_Undef: VG_(printf)("u "); break;
- case RR_Same: VG_(printf)("s "); break;
- case RR_CFAoff: VG_(printf)("c%d ", ctx->reg[i].coff); break;
- case RR_Reg: VG_(printf)("r%d ", ctx->reg[i].reg); break;
- case RR_Arch: VG_(printf)("a "); break;
- default: VG_(core_panic)("ppUnwindContext");
- }
+ for (i =3D 0; i < N_CFI_REGS; i++)
+ ppRegRule(&ctx->reg[i]);
+ VG_(printf)("\n");
+}
+
+
+/* Summarise ctx into si, if possible. Returns True if successful.
+ This is taken to be just after ctx's loc advances; hence the
+ summary is up to but not including the current loc.
+*/
+static Bool summarise_context_x86 ( /*OUT*/CfiSI* si,
+ Addr loc_start,
+ UnwindContext* ctx )
+{
+ initCfiSI(si);
+
+ /* How to generate the CFA */
+ if (ctx->cfa_reg =3D=3D 4 /* ESP */) {
+ si->cfa_sprel =3D True;
+ si->cfa_off =3D ctx->cfa_offset;
+ } else
+ if (ctx->cfa_reg =3D=3D 5 /* EBP */) {
+ si->cfa_sprel =3D False;
+ si->cfa_off =3D ctx->cfa_offset;
+ } else {
+ goto failed;
}
+
+# define SUMMARISE_HOW(_how, _off, _ctxreg) =
\
+ switch (_ctxreg.tag) { =
\
+ case RR_Undef: _how =3D CFIR_UNKNOWN; _off =3D 0; break; =
\
+ case RR_Same: _how =3D CFIR_SAME; _off =3D 0; break; =
\
+ case RR_CFAoff: _how =3D CFIR_MEMCFAREL; _off =3D _ctxreg.coff; br=
eak; \
+ default: goto failed; /* otherwise give up */ =
\
+ }
+
+ SUMMARISE_HOW(si->ra_how, si->ra_off, ctx->reg[8 /* Return address */=
] );
+ SUMMARISE_HOW(si->fp_how, si->fp_off, ctx->reg[5 /* EBP */] );
+
+# undef SUMMARISE_HOW
+
+ /* on x86, it seems the old %esp value before the call is always
+ the same as the CFA. Therefore ... */
+ si->sp_how =3D CFIR_CFAREL;
+ si->sp_off =3D 0;
+
+ /* also, gcc says "Undef" for %ebp when it is unchanged. So .. */
+ if (ctx->reg[5 /* EBP */].tag =3D=3D RR_Undef)
+ si->fp_how =3D CFIR_SAME;
+
+ /* knock out some obviously stupid cases */
+ if (si->ra_how =3D=3D CFIR_SAME) goto failed;
+
+ /* bogus looking range? Note, we require that the difference is
+ representable in 32 bits. */
+ if (loc_start >=3D ctx->loc) goto failed;
+ if (ctx->loc - loc_start > 10000000 /* let's say */)
+ goto failed;
+
+ si->base =3D loc_start + ctx->initloc;
+ si->len =3D (UInt)(ctx->loc - loc_start);
+
+ return True;
+
+ failed:
+ VG_(printf)("summarise_context_x86(loc_start =3D %p)"
+ ": cannot summarise:\n ", loc_start);
+ ppUnwindContext(ctx);
+ return False;
+}
+
+static void ppUnwindContext_x86_summary ( UnwindContext* ctx )
+{
+ VG_(printf)("0x%llx-1: ", (ULong)ctx->loc);
+
+ if (ctx->cfa_reg =3D=3D 4 /* ESP */) {
+ VG_(printf)("SP/CFA=3D%d+%%esp ", ctx->cfa_offset);
+ } else
+ if (ctx->cfa_reg =3D=3D 5 /* EBP */) {
+ VG_(printf)("SP/CFA=3D%d+%%ebp ", ctx->cfa_offset);
+ } else {
+ VG_(printf)("SP/CFA=3Dunknown ", ctx->cfa_offset);
+ }
+
+ VG_(printf)("RA=3D");
+ ppRegRule( &ctx->reg[8 /* Return address */] );
+
+ VG_(printf)("FP=3D");
+ ppRegRule( &ctx->reg[5 /* EBP */] );
VG_(printf)("\n");
}
=20
@@ -1145,19 +1319,38 @@
reached, or until there is a failure. Return True iff success.=20
*/
static=20
-Bool run_CF_instructions ( UnwindContext* ctx, UChar* instrs, Int ilen )
+Bool run_CF_instructions ( SegInfo* si,
+ UnwindContext* ctx, UChar* instrs, Int ilen,
+ UWord fde_arange )
{
+ CfiSI cfisi;
+
Int j, i =3D 0;
- ppUnwindContext(ctx);
+ Addr loc_prev;
+ if (0) ppUnwindContext(ctx);
+ if (0) ppUnwindContext_x86_summary(ctx);
while (True) {
+ loc_prev =3D ctx->loc;
if (i >=3D ilen) break;
if (0) (void)show_CF_instruction( &instrs[i] );
j =3D run_CF_instruction( ctx, &instrs[i] );
if (j =3D=3D 0)
return False; /* execution failed */
i +=3D j;
- ppUnwindContext(ctx);
+ if (0) ppUnwindContext(ctx);
+ if (loc_prev !=3D ctx->loc && si) {
+ summarise_context_x86 ( &cfisi, loc_prev, ctx );
+ VG_(addCfiSI)(si, &cfisi);
+ }
}
+ if (ctx->loc < fde_arange) {
+ loc_prev =3D ctx->loc;
+ ctx->loc =3D fde_arange;
+ if (si) {
+ summarise_context_x86 ( &cfisi, loc_prev, ctx );
+ VG_(addCfiSI)(si, &cfisi);
+ }
+ }
return True;
}
=20
@@ -1174,8 +1367,8 @@
=20
UChar* current_cie =3D NULL;
=20
- if (ehframe_sz !=3D 240) return;
- VG_(printf)("\n\n\neh_frame %p %d\n", ehframe, ehframe_sz);
+ if (0&& ehframe_sz !=3D 240) return;
+ if (0) VG_(printf)("\n\n\neh_frame %p %d\n", ehframe, ehframe_sz);
=20
UChar* data =3D ehframe;
=20
@@ -1200,10 +1393,10 @@
Figure out which it is. */
=20
UChar* ciefde_start =3D data;
- VG_(printf)("\ncie/fde.start =3D %p\n", ciefde_start);
+ if (0) VG_(printf)("\ncie/fde.start =3D %p\n", ciefde_start);
=20
UInt ciefde_len =3D read_UInt(data); data +=3D sizeof(UInt);
- VG_(printf)("cie/fde.length =3D %d\n", ciefde_len);
+ if (0) VG_(printf)("cie/fde.length =3D %d\n", ciefde_len);
=20
/* Apparently, if the .length field is zero, we are at the end
of the sequence. ?? Neither the DWARF2 spec not the AMD64
@@ -1216,7 +1409,7 @@
}
=20
UInt cie_pointer =3D read_UInt(data); data +=3D sizeof(UInt);
- VG_(printf)("cie.pointer =3D %d\n", cie_pointer);
+ if (0) VG_(printf)("cie.pointer =3D %d\n", cie_pointer);
=20
/* If cie_pointer is zero, we've got a CIE; else it's an FDE. */
if (cie_pointer =3D=3D 0) {
@@ -1226,11 +1419,11 @@
=20
/* --------- CIE --------- */
UChar cie_version =3D read_UChar(data); data +=3D sizeof(UChar)=
;
- VG_(printf)("cie.version =3D %d\n", (Int)cie_version);
+ if (0) VG_(printf)("cie.version =3D %d\n", (Int)cie_version=
);
=20
UChar* cie_augmentation =3D data;
data +=3D 1 + VG_(strlen)(cie_augmentation);
- VG_(printf)("cie.augment =3D \"%s\"\n", cie_augmentation);
+ if (0) VG_(printf)("cie.augment =3D \"%s\"\n", cie_augmenta=
tion);
=20
if (0 !=3D VG_(strcmp)(cie_augmentation, "")) {
how =3D "non-NULL cie.augmentation";
@@ -1239,19 +1432,19 @@
=20
cie_codeaf =3D read_leb128( data, &nbytes, 0);
data +=3D nbytes;
- VG_(printf)("cie.code_af =3D %d\n", cie_codeaf);
+ if (0) VG_(printf)("cie.code_af =3D %d\n", cie_codeaf);
=20
cie_dataaf =3D read_leb128( data, &nbytes, 1);
data +=3D nbytes;
- VG_(printf)("cie.data_af =3D %d\n", cie_dataaf);
+ if (0) VG_(printf)("cie.data_af =3D %d\n", cie_dataaf);
=20
UChar cie_rareg =3D read_UChar(data); data +=3D sizeof(UChar);
- VG_(printf)("cie.ra_reg =3D %d\n", (Int)cie_rareg);
+ if (0) VG_(printf)("cie.ra_reg =3D %d\n", (Int)cie_rareg);
=20
cie_instrs =3D data;
cie_ilen =3D ciefde_start + ciefde_len + sizeof(UInt) - data;
- VG_(printf)("cie.instrs =3D %p\n", (Int)cie_instrs);
- VG_(printf)("cie.ilen =3D %d\n", (Int)cie_ilen);
+ if (0) VG_(printf)("cie.instrs =3D %p\n", (Int)cie_instrs)=
;
+ if (0) VG_(printf)("cie.ilen =3D %d\n", (Int)cie_ilen);
=20
if (cie_ilen < 0 || cie_ilen > ehframe_sz) {
how =3D "implausible # cie initial insns";
@@ -1260,33 +1453,33 @@
=20
data +=3D cie_ilen;
=20
- show_CF_instructions(cie_instrs, cie_ilen);
+ if (0) show_CF_instructions(cie_instrs, cie_ilen);
=20
} else {
=20
/* --------- FDE --------- */
=20
- /* Ensure that (1) we have a valid CIE, and (2) that=20
- it is indeed the CIE referred to by this FDE. */
- if (current_cie =3D=3D NULL) {
- how =3D "FDE with no preceding CIE";
- goto bad;
- }
- if (cie_pointer !=3D data - current_cie) {
- how =3D "FDE does not refer to preceding CIE";
- goto bad;
- }
+ /* Ensure that (1) we have a valid CIE, and (2) that it is
+ indeed the CIE referred to by this FDE. */
+ if (current_cie =3D=3D NULL) {
+ how =3D "FDE with no preceding CIE";
+ goto bad;
+ }
+ if (cie_pointer !=3D data - current_cie) {
+ how =3D "FDE does not refer to preceding CIE";
+ goto bad;
+ }
=20
Addr fde_initloc =3D read_Addr(data); data +=3D sizeof(Addr);
- VG_(printf)("fde.initloc =3D %p\n", (void*)fde_initloc);
+ if (0) VG_(printf)("fde.initloc =3D %p\n", (void*)fde_initl=
oc);
=20
UWord fde_arange =3D read_Addr(data); data +=3D sizeof(Addr);
- VG_(printf)("fde.arangec =3D %p\n", (void*)fde_arange);
+ if (0) VG_(printf)("fde.arangec =3D %p\n", (void*)fde_arang=
e);
=20
UChar* fde_instrs =3D data;
Int fde_ilen =3D ciefde_start + ciefde_len + sizeof(UInt) =
- data;
- VG_(printf)("fde.instrs =3D %p\n", (Int)fde_instrs);
- VG_(printf)("fde.ilen =3D %d\n", (Int)fde_ilen);
+ if (0) VG_(printf)("fde.instrs =3D %p\n", (Int)fde_instrs)=
;
+ if (0) VG_(printf)("fde.ilen =3D %d\n", (Int)fde_ilen);
=20
if (fde_ilen < 0 || fde_ilen > ehframe_sz) {
how =3D "implausible # fde initial insns";
@@ -1298,20 +1491,17 @@
initUnwindContext(&ctx);
ctx.code_a_f =3D cie_codeaf;
ctx.data_a_f =3D cie_dataaf;
- ok =3D run_CF_instructions(&ctx, cie_instrs, cie_ilen);
+ ctx.initloc =3D fde_initloc;
+ ok =3D run_CF_instructions(NULL, &ctx, cie_instrs, cie_ilen, 0);
if (ok)
- ok =3D run_CF_instructions(&ctx, fde_instrs, fde_ilen);
+ ok =3D run_CF_instructions(si, &ctx, fde_instrs, fde_ilen, fde_aran=
ge);
}
}
=20
- /* Read a CIE and remember important bits */
-
-
-
return;
=20
bad:
- VG_(message)(Vg_UserMsg, "Warning: %s in DWARF2 CIE reading", how);
+ VG_(message)(Vg_UserMsg, "Warning: %s in DWARF2 CFI reading", how);
return;
}
=20
Modified: trunk/coregrind/vg_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/vg_main.c 2005-04-30 07:55:58 UTC (rev 3581)
+++ trunk/coregrind/vg_main.c 2005-04-30 18:47:48 UTC (rev 3582)
@@ -1588,7 +1588,7 @@
properly really entails getting rid of the circularity between
the two memory allocators, but that is more than I have time to
sort out right now. */
- VG_(clo_vex_control).guest_chase_thresh =3D 0;
+ // VG_(clo_vex_control).guest_chase_thresh =3D 0;
=20
/* parse the options we have (only the options we care about now) */
for (i =3D 1; i < vg_argc; i++) {
Modified: trunk/coregrind/vg_mylibc.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/vg_mylibc.c 2005-04-30 07:55:58 UTC (rev 3581)
+++ trunk/coregrind/vg_mylibc.c 2005-04-30 18:47:48 UTC (rev 3582)
@@ -902,7 +902,7 @@
tst->os_state.valgrind_stack_szB;
=20
VG_(get_StackTrace2)(ips, VG_(clo_backtrace_size),
- ret, fp, sp, stacktop);
+ ret, sp, fp, sp, stacktop);
VG_(pp_StackTrace) (ips, VG_(clo_backtrace_size));
}
=20
Modified: trunk/coregrind/vg_signals.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/vg_signals.c 2005-04-30 07:55:58 UTC (rev 3581)
+++ trunk/coregrind/vg_signals.c 2005-04-30 18:47:48 UTC (rev 3582)
@@ -1943,6 +1943,7 @@
tst =3D VG_(get_ThreadState)(tid);
VG_(get_StackTrace2)(ips, VG_(clo_backtrace_size),=20
VGP_UCONTEXT_INSTR_PTR(uc),
+ VGP_UCONTEXT_STACK_PTR(uc),
VGP_UCONTEXT_FRAME_PTR(uc),
VGP_UCONTEXT_STACK_PTR(uc),
tst->os_state.valgrind_stack_base +=20
Modified: trunk/coregrind/vg_symtab2.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/vg_symtab2.c 2005-04-30 07:55:58 UTC (rev 3581)
+++ trunk/coregrind/vg_symtab2.c 2005-04-30 18:47:48 UTC (rev 3582)
@@ -369,6 +369,40 @@
addScopeRange ( si, &range );
}
=20
+
+/* Top-level place to call to add a CFI summary record. The supplied
+ CfiSI is copied. */
+void VG_(addCfiSI) ( SegInfo* si, CfiSI* cfisi )
+{
+ static const Bool debug =3D False;
+
+ if (debug) {
+ VG_(printf)("adding CfiSI: ");
+ VG_(ppCfiSI)(cfisi);
+ }
+
+ UInt new_sz, i;
+ CfiSI* new_tab;
+
+ if (si->cfisi_used =3D=3D si->cfisi_size) {
+ new_sz =3D 2 * si->cfisi_size;
+ if (new_sz =3D=3D 0) new_sz =3D 20;
+ new_tab =3D VG_(arena_malloc)(VG_AR_SYMTAB, new_sz * sizeof(CfiSI)=
);
+ if (si->cfisi !=3D NULL) {
+ for (i =3D 0; i < si->cfisi_used; i++)
+ new_tab[i] =3D si->cfisi[i];
+ VG_(arena_free)(VG_AR_SYMTAB, si->cfisi);
+ }
+ si->cfisi =3D new_tab;
+ si->cfisi_size =3D new_sz;
+ }
+
+ si->cfisi[si->cfisi_used] =3D *cfisi;
+ si->cfisi_used++;
+ vg_assert(si->cfisi_used <=3D si->cfisi_size);
+}
+
+
/*------------------------------------------------------------*/
/*--- Helpers ---*/
/*------------------------------------------------------------*/
@@ -2276,6 +2310,82 @@
#undef APPEND
}
=20
+/* Returns True if OK. If not OK, *{ip,sp,fp}P are not changed. */
+
+Bool VG_(use_CFI_info) ( /*MOD*/Addr* ipP,
+ /*MOD*/Addr* spP,
+ /*MOD*/Addr* fpP,
+ Addr min_accessible,
+ Addr max_accessible )
+{
+ Int i;
+ SegInfo* si;
+ CfiSI* cfisi =3D NULL;
+ Addr cfa, ipHere, spHere, fpHere, ipPrev, spPrev, fpPrev;
+
+ if (0) VG_(printf)("search for %p\n", *ipP);
+
+ for (si =3D segInfo; si !=3D NULL; si =3D si->next) {
+ for (i =3D 0; i < si->cfisi_used; i++) {
+ if (si->cfisi[i].base <=3D *ipP
+ && *ipP < si->cfisi[i].base+si->cfisi[i].len) {
+ cfisi =3D &si->cfisi[i];
+ goto postloop;
+ }
+ }
+ }
+
+ postloop:
+ if (cfisi =3D=3D NULL)
+ return False;
+
+ if (0) {
+ VG_(printf)("found cfisi: ");=20
+ VG_(ppCfiSI)(cfisi);
+ }
+
+ ipPrev =3D spPrev =3D fpPrev =3D 0;
+
+ ipHere =3D *ipP;
+ spHere =3D *spP;
+ fpHere =3D *fpP;
+
+ cfa =3D cfisi->cfa_off + (cfisi->cfa_sprel ? spHere : fpHere);
+
+# define COMPUTE(_prev, _here, _how, _off) \
+ do { \
+ switch (_how) { \
+ case CFIR_UNKNOWN: \
+ return False; \
+ case CFIR_SAME: \
+ _prev =3D _here; break; \
+ case CFIR_MEMCFAREL: { \
+ Addr a =3D cfa + (Word)_off; \
+ if (a < min_accessible \
+ || a+sizeof(Addr) > max_accessible) \
+ return False; \
+ _prev =3D *(Addr*)a; \
+ break; \
+ } \
+ case CFIR_CFAREL: \
+ _prev =3D cfa + (Word)_off; \
+ break; \
+ } \
+ } while (0)
+
+ COMPUTE(ipPrev, ipHere, cfisi->ra_how, cfisi->ra_off);
+ COMPUTE(spPrev, spHere, cfisi->sp_how, cfisi->sp_off);
+ COMPUTE(fpPrev, fpHere, cfisi->fp_how, cfisi->fp_off);
+
+# undef COMPUTE
+
+ *ipP =3D ipPrev;
+ *spP =3D spPrev;
+ *fpP =3D fpPrev;
+ return True;
+}
+
+
/*------------------------------------------------------------*/
/*--- SegInfo accessor functions ---*/
/*------------------------------------------------------------*/
Modified: trunk/coregrind/vg_symtab2.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/vg_symtab2.h 2005-04-30 07:55:58 UTC (rev 3581)
+++ trunk/coregrind/vg_symtab2.h 2005-04-30 18:47:48 UTC (rev 3582)
@@ -118,20 +118,50 @@
#define STRCHUNKSIZE (64*1024)
=20
=20
-/* A structure to summarise CFI summary info. It defines an address
- range, and for that address range, gives info on how the
- procedure's return address is to be derived from the current stack
- pointer value in that range. For example, if .raoffset is 16, then
- the return address is found in memory at (SP+16). */
+/* A structure to summarise CFI summary info for the code address
+ range [base .. base+len-1]. In short, if you know (sp,fp,ip) at
+ some point and ip is in the range [base .. base+len-1], it tells
+ you how to calculate (sp,fp) for the caller of the current
+ frame and also ra, the return address of the current frame.
+
+ First off, calculate CFA, the Canonical Frame Address, thusly:
+
+ cfa =3D if cfa_sprel then sp+cfa_off else fp+cfa_off
+
+ Once that is done, the previous frame's sp/fp values and this
+ frame's ra value can be calculated like this:
+
+ old_sp/fp/ra
+ =3D case sp/fp/ra_how of
+ CFIR_UNKNOWN -> we don't know, sorry
+ CFIR_SAME -> same as it was before (sp/fp only)
+ CFIR_CFAREL -> cfa + sp/fp/ra_off
+ CFIR_MEMCFAREL -> *( cfa + sp/fp/ra_off )
+*/
+
+#define CFIR_UNKNOWN ((UChar)0)
+#define CFIR_SAME ((UChar)1)
+#define CFIR_CFAREL ((UChar)2)
+#define CFIR_MEMCFAREL ((UChar)3)
+
typedef
struct {
- Addr base;
- UInt len;
- Int raoffset;
+ Addr base;
+ UInt len;
+ Bool cfa_sprel;
+ UChar ra_how; /* a CFIR_ value */
+ UChar sp_how; /* a CFIR_ value */
+ UChar fp_how; /* a CFIR_ value */
+ Int cfa_off;
+ Int ra_off;
+ Int sp_off;
+ Int fp_off;
}
CfiSI;
=20
+extern void VG_(ppCfiSI) ( CfiSI* );
=20
+
/* A structure which contains information pertaining to one mapped
text segment. (typedef in tool.h) */
struct _SegInfo {
@@ -196,6 +226,7 @@
Char *VG_(addStr) ( SegInfo* si, Char* str, Int len );
void VG_(addScopeInfo) ( SegInfo* si, Addr this, Addr next, Scope *scope=
);
void VG_(addLineInfo) ( SegInfo* si, Char* filename, Addr this, Addr nex=
t, Int lineno, Int entry);
+void VG_(addCfiSI) ( SegInfo* si, CfiSI* cfisi );
=20
/* Non-fatal -- use vg_panic if terminal. */
void VG_(symerr) ( Char* msg );
|
|
From: <sv...@va...> - 2005-04-30 07:56:06
|
Author: sewardj
Date: 2005-04-30 08:55:58 +0100 (Sat, 30 Apr 2005)
New Revision: 3581
Modified:
trunk/coregrind/vg_dwarf.c
trunk/coregrind/vg_symtab2.c
trunk/coregrind/vg_symtab2.h
Log:
Beginnings of a DWARF CFI-based frame-unwinder. Does not yet do
anything. This is needed to get stack snapshots on amd64 code
compiled with -O, and could also be used for stack snapshots on x86
code compiled with -fomit-frame-pointer if it also has CFI info.
Modified: trunk/coregrind/vg_dwarf.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/vg_dwarf.c 2005-04-28 10:32:02 UTC (rev 3580)
+++ trunk/coregrind/vg_dwarf.c 2005-04-30 07:55:58 UTC (rev 3581)
@@ -825,6 +825,497 @@
}
=20
=20
+/*------------------------------------------------------------*/
+/*--- Read call-frame info from an .eh_frame section ---*/
+/*------------------------------------------------------------*/
+
+/* the number of regs we are prepared to unwind */
+#define N_CFI_REGS 20
+
+/* Instructions for the automaton */
+enum dwarf_cfa_primary_ops
+ {
+ DW_CFA_use_secondary =3D 0,
+ DW_CFA_advance_loc =3D 1,
+ DW_CFA_offset =3D 2,
+ DW_CFA_restore =3D 3
+ };
+
+enum dwarf_cfa_secondary_ops
+ {
+ DW_CFA_nop =3D 0x00,
+ DW_CFA_set_loc =3D 0x01,
+ DW_CFA_advance_loc1 =3D 0x02,
+ DW_CFA_advance_loc2 =3D 0x03,
+ DW_CFA_advance_loc4 =3D 0x04,
+ DW_CFA_offset_extended =3D 0x05,
+ DW_CFA_restore_extended =3D 0x06,
+ DW_CFA_undefined =3D 0x07,
+ DW_CFA_same_value =3D 0x08,
+ DW_CFA_register =3D 0x09,
+ DW_CFA_remember_state =3D 0x0a,
+ DW_CFA_restore_state =3D 0x0b,
+ DW_CFA_def_cfa =3D 0x0c,
+ DW_CFA_def_cfa_register =3D 0x0d,
+ DW_CFA_def_cfa_offset =3D 0x0e,
+ DW_CFA_lo_user =3D 0x1c,
+ DW_CFA_GNU_args_size =3D 0x2e,
+ DW_CFA_hi_user =3D 0x3f
+ };
+
+
+typedef
+ struct {
+ enum { RR_Undef, RR_Same, RR_CFAoff, RR_Reg, RR_Arch } tag;
+
+ /* CFA offset if tag=3D=3DRR_CFAoff */
+ Int coff;
+
+ /* reg, if tag=3D=3DRR_Reg */
+ Int reg;
+ }
+ RegRule;
+
+typedef
+ struct {
+ /* Read-only fields. */
+ Int code_a_f;
+ Int data_a_f;
+ /* The rest of these fields can be modifed by
+ run_CF_instruction. */
+ /* The LOC entry */
+ Addr loc;
+ /* The CFA entry */
+ Int cfa_reg;
+ Int cfa_offset; /* in bytes */
+ /* register unwind rules */
+ RegRule reg[N_CFI_REGS];
+ }
+ UnwindContext;
+
+static void initUnwindContext ( /*OUT*/UnwindContext* ctx )
+{
+ Int i;
+ ctx->code_a_f =3D 0;
+ ctx->data_a_f =3D 0;
+ ctx->loc =3D 0;
+ ctx->cfa_reg =3D 0;
+ ctx->cfa_offset =3D 0;
+ for (i =3D 0; i < N_CFI_REGS; i++) {
+ ctx->reg[i].tag =3D RR_Undef;
+ ctx->reg[i].coff =3D 0;
+ ctx->reg[i].reg =3D 0;
+ }
+}
+
+static void ppUnwindContext ( UnwindContext* ctx )
+{
+ Int i;
+ VG_(printf)("0x%llx: ", (ULong)ctx->loc);
+ VG_(printf)("%d(r%d) ", ctx->cfa_offset, ctx->cfa_reg);
+ for (i =3D 0; i < N_CFI_REGS; i++) {
+ switch (ctx->reg[i].tag) {
+ case RR_Undef: VG_(printf)("u "); break;
+ case RR_Same: VG_(printf)("s "); break;
+ case RR_CFAoff: VG_(printf)("c%d ", ctx->reg[i].coff); break;
+ case RR_Reg: VG_(printf)("r%d ", ctx->reg[i].reg); break;
+ case RR_Arch: VG_(printf)("a "); break;
+ default: VG_(core_panic)("ppUnwindContext");
+ }
+ }
+ VG_(printf)("\n");
+}
+
+static inline Bool host_is_little_endian ( void )
+{
+ UInt x =3D 0x76543210;
+ UChar* p =3D (UChar*)(&x);
+ return toBool(*p =3D=3D 0x10);
+}
+
+
+static UShort read_UShort ( UChar* data )
+{
+ vg_assert(host_is_little_endian());
+ UInt r =3D 0;
+ r =3D data[0]=20
+ | ( ((UInt)data[1]) << 8 );
+ return r;
+}
+
+static UInt read_UInt ( UChar* data )
+{
+ vg_assert(host_is_little_endian());
+ UInt r =3D 0;
+ r =3D data[0]=20
+ | ( ((UInt)data[1]) << 8 )=20
+ | ( ((UInt)data[2]) << 16 )=20
+ | ( ((UInt)data[3]) << 24 );
+ return r;
+}
+
+static Addr read_Addr ( UChar* data )
+{
+ if (sizeof(Addr) =3D=3D 4)
+ return read_UInt(data);
+ vg_assert(0);
+}
+
+static UChar read_UChar ( UChar* data )
+{
+ return data[0];
+}
+
+
+/* Run a CFI instruction, and also return its length.
+ Returns 0 if the instruction could not be executed.=20
+*/
+static Int run_CF_instruction ( /*MOD*/UnwindContext* ctx,=20
+ UChar* instr )
+{
+ Int off, reg, nleb;
+ UInt delta;
+ Int i =3D 0;
+ UChar hi2 =3D (instr[i] >> 6) & 3;
+ UChar lo6 =3D instr[i] & 0x3F;
+ i++;
+
+ if (hi2 =3D=3D DW_CFA_advance_loc) {
+ delta =3D (UInt)lo6;
+ ctx->loc +=3D delta;
+ return i;
+ }
+
+ if (hi2 =3D=3D DW_CFA_offset) {
+ /* Set rule for reg 'lo6' to CFAoffset(off * data_af) */
+ off =3D read_leb128( &instr[i], &nleb, 0 );
+ i +=3D nleb;
+ reg =3D (Int)lo6;
+ if (reg < 0 || reg >=3D N_CFI_REGS)=20
+ return 0; /* fail */
+ ctx->reg[reg].tag =3D RR_CFAoff;
+ ctx->reg[reg].coff =3D off * ctx->data_a_f;
+ return i;
+ }
+
+ if (hi2 =3D=3D DW_CFA_restore) {
+ vg_assert(0);
+ VG_(printf)("DW_CFA_restore(%d)\n", (Int)lo6);
+ return i;
+ }
+
+ vg_assert(hi2 =3D=3D DW_CFA_use_secondary);
+
+ switch (lo6) {
+ case DW_CFA_nop:=20
+ break;
+ case DW_CFA_advance_loc1:
+ vg_assert(0);
+ delta =3D (UInt)read_UChar(&instr[i]); i+=3D sizeof(UChar);
+ VG_(printf)("DW_CFA_advance_loc1(%d)\n", delta);=20
+ break;
+
+ case DW_CFA_def_cfa:
+ reg =3D read_leb128( &instr[i], &nleb, 0 );
+ i +=3D nleb;
+ off =3D read_leb128( &instr[i], &nleb, 0 );
+ i +=3D nleb;
+ if (reg < 0 || reg >=3D N_CFI_REGS)=20
+ return 0; /* fail */
+ ctx->cfa_reg =3D reg;
+ ctx->cfa_offset =3D off;
+ break;
+
+ case DW_CFA_def_cfa_register: {
+ reg =3D read_leb128( &instr[i], &nleb, 0);
+ i +=3D nleb;
+ if (reg < 0 || reg >=3D N_CFI_REGS)=20
+ return 0; /* fail */
+ ctx->cfa_reg =3D reg;
+ break;
+ }
+ case DW_CFA_def_cfa_offset: {
+ off =3D read_leb128( &instr[i], &nleb, 0);
+ i +=3D nleb;
+ ctx->cfa_offset =3D off;
+ break;
+ }
+ case DW_CFA_GNU_args_size: {
+ /* No idea what is supposed to happen. gdb-6.3 simply
+ ignores these. */
+ off =3D read_leb128( &instr[i], &nleb, 0 );
+ i +=3D nleb;
+ break;
+ }
+ default:=20
+ vg_assert(0);
+ VG_(printf)("0:%d\n", (Int)lo6);=20
+ break;
+ }
+
+ return i; =20
+}
+
+
+/* Show a CFI instruction, and also return its length. */
+static Int show_CF_instruction ( UChar* instr )
+{
+ UInt delta;
+ Int off, reg, nleb;
+ Int i =3D 0;
+ UChar hi2 =3D (instr[i] >> 6) & 3;
+ UChar lo6 =3D instr[i] & 0x3F;
+ i++;
+
+ if (hi2 =3D=3D DW_CFA_advance_loc) {
+ VG_(printf)("DW_CFA_advance_loc(%d)\n", (Int)lo6);
+ return i;
+ }
+
+ if (hi2 =3D=3D DW_CFA_offset) {
+ off =3D read_leb128( &instr[i], &nleb, 0 );
+ i +=3D nleb;
+ VG_(printf)("DW_CFA_offset(r%d + %d x data_af)\n", (Int)lo6, off);
+ return i;
+ }
+
+ if (hi2 =3D=3D DW_CFA_restore) {
+ VG_(printf)("DW_CFA_restore(%d)\n", (Int)lo6);
+ return i;
+ }
+
+ vg_assert(hi2 =3D=3D DW_CFA_use_secondary);
+
+ switch (lo6) {
+
+ case DW_CFA_nop:=20
+ VG_(printf)("DW_CFA_nop\n");=20
+ break;
+
+ case DW_CFA_advance_loc1:
+ delta =3D (UInt)read_UChar(&instr[i]); i+=3D sizeof(UChar);
+ VG_(printf)("DW_CFA_advance_loc1(%d)\n", delta);=20
+ break;
+
+ case DW_CFA_def_cfa:
+ reg =3D read_leb128( &instr[i], &nleb, 0 );
+ i +=3D nleb;
+ off =3D read_leb128( &instr[i], &nleb, 0 );
+ i +=3D nleb;
+ VG_(printf)("DW_CFA_def_cfa(r%d, off %d)\n", reg, off);=20
+ break;
+
+ case DW_CFA_def_cfa_register:
+ reg =3D read_leb128( &instr[i], &nleb, 0);
+ i +=3D nleb;
+ VG_(printf)("DW_CFA_def_cfa_register(r%d)\n", reg);=20
+ break;
+
+ case DW_CFA_def_cfa_offset:=20
+ off =3D read_leb128( &instr[i], &nleb, 0);
+ i +=3D nleb;
+ VG_(printf)("DW_CFA_def_cfa_offset(%d)\n", off);=20
+ break;
+
+ case DW_CFA_GNU_args_size:
+ off =3D read_leb128( &instr[i], &nleb, 0 );
+ i +=3D nleb;
+ VG_(printf)("DW_CFA_GNU_args_size(%d)\n", off );=20
+ break;
+
+ default:=20
+ VG_(printf)("0:%d\n", (Int)lo6);=20
+ break;
+ }
+
+ return i;
+}
+
+
+static void show_CF_instructions ( UChar* instrs, Int ilen )
+{
+ Int i =3D 0;
+ while (True) {
+ if (i >=3D ilen) break;
+ i +=3D show_CF_instruction( &instrs[i] );
+ }
+}
+
+/* Run the CF instructions in instrs[0 .. ilen-1], until the end is
+ reached, or until there is a failure. Return True iff success.=20
+*/
+static=20
+Bool run_CF_instructions ( UnwindContext* ctx, UChar* instrs, Int ilen )
+{
+ Int j, i =3D 0;
+ ppUnwindContext(ctx);
+ while (True) {
+ if (i >=3D ilen) break;
+ if (0) (void)show_CF_instruction( &instrs[i] );
+ j =3D run_CF_instruction( ctx, &instrs[i] );
+ if (j =3D=3D 0)
+ return False; /* execution failed */
+ i +=3D j;
+ ppUnwindContext(ctx);
+ }
+ return True;
+}
+
+
+void VG_(read_callframe_info_dwarf2)=20
+ ( /*OUT*/SegInfo* si, UChar* ehframe, Int ehframe_sz )
+{
+ UnwindContext ctx;
+ Int nbytes;
+ HChar* how =3D NULL;
+ Int cie_codeaf =3D 0;
+ Int cie_dataaf =3D 0;
+ Bool ok;
+
+ UChar* current_cie =3D NULL;
+
+ if (ehframe_sz !=3D 240) return;
+ VG_(printf)("\n\n\neh_frame %p %d\n", ehframe, ehframe_sz);
+
+ UChar* data =3D ehframe;
+
+ UChar* cie_instrs =3D NULL;
+ Int cie_ilen =3D 0;
+
+ /* Loop over CIEs/FDEs */
+
+ while (True) {
+
+ /* Are we done? */
+ if (data =3D=3D ehframe + ehframe_sz)
+ return;
+
+ /* Overshot the end? Means something is wrong */
+ if (data > ehframe + ehframe_sz) {
+ how =3D "overran the end of .eh_frame";
+ goto bad;
+ }
+
+ /* Ok, we must be looking at the start of a new CIE or FDE.
+ Figure out which it is. */
+
+ UChar* ciefde_start =3D data;
+ VG_(printf)("\ncie/fde.start =3D %p\n", ciefde_start);
+
+ UInt ciefde_len =3D read_UInt(data); data +=3D sizeof(UInt);
+ VG_(printf)("cie/fde.length =3D %d\n", ciefde_len);
+
+ /* Apparently, if the .length field is zero, we are at the end
+ of the sequence. ?? Neither the DWARF2 spec not the AMD64
+ ABI spec say this, though. */
+ if (ciefde_len =3D=3D 0) {
+ if (data =3D=3D ehframe + ehframe_sz)
+ return;
+ how =3D "zero-sized CIE/FDE but not at section end\n";
+ goto bad;
+ }
+
+ UInt cie_pointer =3D read_UInt(data); data +=3D sizeof(UInt);
+ VG_(printf)("cie.pointer =3D %d\n", cie_pointer);
+
+ /* If cie_pointer is zero, we've got a CIE; else it's an FDE. */
+ if (cie_pointer =3D=3D 0) {
+
+ /* Remember the start proper of the current CIE */
+ current_cie =3D ciefde_start + sizeof(UInt);
+
+ /* --------- CIE --------- */
+ UChar cie_version =3D read_UChar(data); data +=3D sizeof(UChar)=
;
+ VG_(printf)("cie.version =3D %d\n", (Int)cie_version);
+
+ UChar* cie_augmentation =3D data;
+ data +=3D 1 + VG_(strlen)(cie_augmentation);
+ VG_(printf)("cie.augment =3D \"%s\"\n", cie_augmentation);
+
+ if (0 !=3D VG_(strcmp)(cie_augmentation, "")) {
+ how =3D "non-NULL cie.augmentation";
+ goto bad;
+ }
+
+ cie_codeaf =3D read_leb128( data, &nbytes, 0);
+ data +=3D nbytes;
+ VG_(printf)("cie.code_af =3D %d\n", cie_codeaf);
+
+ cie_dataaf =3D read_leb128( data, &nbytes, 1);
+ data +=3D nbytes;
+ VG_(printf)("cie.data_af =3D %d\n", cie_dataaf);
+
+ UChar cie_rareg =3D read_UChar(data); data +=3D sizeof(UChar);
+ VG_(printf)("cie.ra_reg =3D %d\n", (Int)cie_rareg);
+
+ cie_instrs =3D data;
+ cie_ilen =3D ciefde_start + ciefde_len + sizeof(UInt) - data;
+ VG_(printf)("cie.instrs =3D %p\n", (Int)cie_instrs);
+ VG_(printf)("cie.ilen =3D %d\n", (Int)cie_ilen);
+
+ if (cie_ilen < 0 || cie_ilen > ehframe_sz) {
+ how =3D "implausible # cie initial insns";
+ goto bad;
+ }
+
+ data +=3D cie_ilen;
+
+ show_CF_instructions(cie_instrs, cie_ilen);
+
+ } else {
+
+ /* --------- FDE --------- */
+
+ /* Ensure that (1) we have a valid CIE, and (2) that=20
+ it is indeed the CIE referred to by this FDE. */
+ if (current_cie =3D=3D NULL) {
+ how =3D "FDE with no preceding CIE";
+ goto bad;
+ }
+ if (cie_pointer !=3D data - current_cie) {
+ how =3D "FDE does not refer to preceding CIE";
+ goto bad;
+ }
+
+ Addr fde_initloc =3D read_Addr(data); data +=3D sizeof(Addr);
+ VG_(printf)("fde.initloc =3D %p\n", (void*)fde_initloc);
+
+ UWord fde_arange =3D read_Addr(data); data +=3D sizeof(Addr);
+ VG_(printf)("fde.arangec =3D %p\n", (void*)fde_arange);
+
+ UChar* fde_instrs =3D data;
+ Int fde_ilen =3D ciefde_start + ciefde_len + sizeof(UInt) =
- data;
+ VG_(printf)("fde.instrs =3D %p\n", (Int)fde_instrs);
+ VG_(printf)("fde.ilen =3D %d\n", (Int)fde_ilen);
+
+ if (fde_ilen < 0 || fde_ilen > ehframe_sz) {
+ how =3D "implausible # fde initial insns";
+ goto bad;
+ }
+
+ data +=3D fde_ilen;
+
+ initUnwindContext(&ctx);
+ ctx.code_a_f =3D cie_codeaf;
+ ctx.data_a_f =3D cie_dataaf;
+ ok =3D run_CF_instructions(&ctx, cie_instrs, cie_ilen);
+ if (ok)
+ ok =3D run_CF_instructions(&ctx, fde_instrs, fde_ilen);
+ }
+ }
+
+ /* Read a CIE and remember important bits */
+
+
+
+ return;
+
+ bad:
+ VG_(message)(Vg_UserMsg, "Warning: %s in DWARF2 CIE reading", how);
+ return;
+}
+
+
/*--------------------------------------------------------------------*/
/*--- end vg_dwarf.c ---*/
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/vg_symtab2.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/vg_symtab2.c 2005-04-28 10:32:02 UTC (rev 3580)
+++ trunk/coregrind/vg_symtab2.c 2005-04-30 07:55:58 UTC (rev 3581)
@@ -96,6 +96,7 @@
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);
=20
for(chunk =3D si->strchunks; chunk !=3D NULL; chunk =3D next) {
next =3D chunk->next;
@@ -1455,6 +1456,7 @@
UChar* debug_line =3D NULL; /* .debug_line (dwarf2) */
UChar* dwarf1d =3D NULL; /* .debug (dwarf1) */
UChar* dwarf1l =3D NULL; /* .line (dwarf1) */
+ UChar* ehframe =3D NULL; /* .eh_frame (dwarf2) */
=20
/* Section sizes, in bytes */
UInt o_strtab_sz =3D 0;
@@ -1467,6 +1469,7 @@
UInt debug_line_sz =3D 0;
UInt dwarf1d_sz =3D 0;
UInt dwarf1l_sz =3D 0;
+ UInt ehframe_sz =3D 0;
=20
Bool has_debuginfo =3D False;
=20
@@ -1503,6 +1506,7 @@
else FIND(".debug_line", debug_line, debug_line_sz, 0, UCha=
r*)
else FIND(".debug", dwarf1d, dwarf1d_sz, 0, UCha=
r*)
else FIND(".line", dwarf1l, dwarf1l_sz, 0, UCha=
r*)
+ else FIND(".eh_frame", ehframe, ehframe_sz, 0, UCha=
r*)
=20
else FIND(".got", si->got_start, si->got_size, 1, Addr=
)
else FIND(".plt", si->plt_start, si->plt_size, 1, Addr=
)
@@ -1575,6 +1579,11 @@
}
}
=20
+ /* Read .eh_frame (call-frame-info) if any */
+ if (ehframe && ehframe_sz > 4) {
+ VG_(read_callframe_info_dwarf2) ( si, ehframe, ehframe_sz );
+ }
+
/* Read the stabs and/or dwarf2 debug information, if any. */
if (stab !=3D NULL && stabstr !=3D NULL) {
has_debuginfo =3D True;
@@ -1591,9 +1600,10 @@
dwarf1l, dwarf1l_sz );
}=20
if (!has_debuginfo) {
- VG_(symerr)(" object doesn't have any debug info");
+ VG_(symerr)(" object doesn't have any line number info");
goto out;
}
+
}
res =3D True;
=20
@@ -1646,6 +1656,8 @@
si->strchunks =3D NULL;
si->scopetab =3D NULL;
si->scopetab_size =3D si->scopetab_used =3D 0;
+ si->cfisi =3D NULL;
+ si->cfisi_size =3D si->cfisi_used =3D 0;
=20
si->seg =3D seg;
=20
Modified: trunk/coregrind/vg_symtab2.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/vg_symtab2.h 2005-04-28 10:32:02 UTC (rev 3580)
+++ trunk/coregrind/vg_symtab2.h 2005-04-30 07:55:58 UTC (rev 3581)
@@ -117,6 +117,21 @@
=20
#define STRCHUNKSIZE (64*1024)
=20
+
+/* A structure to summarise CFI summary info. It defines an address
+ range, and for that address range, gives info on how the
+ procedure's return address is to be derived from the current stack
+ pointer value in that range. For example, if .raoffset is 16, then
+ the return address is found in memory at (SP+16). */
+typedef
+ struct {
+ Addr base;
+ UInt len;
+ Int raoffset;
+ }
+ CfiSI;
+
+
/* A structure which contains information pertaining to one mapped
text segment. (typedef in tool.h) */
struct _SegInfo {
@@ -144,6 +159,10 @@
ScopeRange *scopetab;
UInt scopetab_used;
UInt scopetab_size;
+ /* An expandable array of CFI summary info records. */
+ CfiSI* cfisi;
+ UInt cfisi_used;
+ UInt cfisi_size;
=20
/* Expandable arrays of characters -- the string table.
Pointers into this are stable (the arrays are not reallocated)
@@ -201,7 +220,13 @@
UChar* dwarf1d, Int dwarf1d_sz,=20
UChar* dwarf1l, Int dwarf1l_sz );
=20
+/* --------------------
+ CFI reader
+ -------------------- */
+void VG_(read_callframe_info_dwarf2)=20
+ ( /*OUT*/SegInfo* si, UChar* ehframe, Int ehframe_sz );
=20
+
#endif /* _VG_SYMTYPE_H */
=20
/*--------------------------------------------------------------------*/
|
|
From: <js...@ac...> - 2005-04-30 03:02:55
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-04-30 03:50:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_mmx: valgrind ./insn_mmx insn_mmxext: (skipping, prereq failed: ../../../tests/cputest x86-mmxext) insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 201 tests, 5 stderr failures, 0 stdout failures ================= memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/writev (stderr) corecheck/tests/fdleak_fcntl (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <to...@co...> - 2005-04-30 02:36:19
|
Nightly build on dunsmere ( athlon, Fedora Core 3 ) started at 2005-04-30 03:30:05 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 == 176 tests, 79 stderr failures, 4 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/clientperm (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/errs1 (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stderr) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/overlap (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_fork (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/scalar_vfork (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) memcheck/tests/x86/fpeflags (stderr) memcheck/tests/x86/pushfpopf (stderr) memcheck/tests/x86/tronical (stderr) memcheck/tests/zeropage (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/x86/int (stderr) none/tests/x86/sigcontext (stdout) none/tests/x86/sigcontext (stderr) |
|
From: Tom H. <th...@cy...> - 2005-04-30 02:31:05
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-04-30 03:25:01 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 == 175 tests, 7 stderr failures, 2 stdout failures ================= memcheck/tests/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_supp (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/sigcontext (stdout) none/tests/x86/sigcontext (stderr) |
|
From: Tom H. <to...@co...> - 2005-04-30 02:26:25
|
Nightly build on dunsmere ( Fedora Core 3 ) started at 2005-04-30 03:20:03 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int sh: line 1: 20769 Segmentation fault VALGRINDLIB=/tmp/valgrind.27473/valgrind/.in_place /tmp/valgrind.27473/valgrind/./coregrind/valgrind --command-line-only=yes --memcheck:leak-check=no --addrcheck:leak-check=no --tool=none ./int >int.stdout.out 2>int.stderr.out pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 207 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_supp (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-30 02:22:30
|
Nightly build on audi ( Red Hat 9 ) started at 2005-04-30 03:15:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow fpu_lazy_eflags: valgrind ./fpu_lazy_eflags insn_basic: valgrind ./insn_basic insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 206 tests, 1 stderr failure, 0 stdout failures ================= memcheck/tests/scalar (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-30 02:20:39
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-04-30 03:15:02 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 == 174 tests, 17 stderr failures, 2 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (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/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/vgtest_ume (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/sigcontext (stdout) none/tests/x86/sigcontext (stderr) |
|
From: Tom H. <th...@cy...> - 2005-04-30 02:11:35
|
Nightly build on alvis ( Red Hat 7.3 ) started at 2005-04-30 03:05:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow == 205 tests, 17 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/distinguished-writes (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/pointer-trace (stderr) memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/vgtest_ume (stderr) addrcheck/tests/leak-0 (stderr) addrcheck/tests/leak-cycle (stderr) addrcheck/tests/leak-regroot (stderr) addrcheck/tests/leak-tree (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-30 02:04:46
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-04-30 03:00: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 == 156 tests, 84 stderr failures, 4 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/clientperm (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/errs1 (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stderr) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/overlap (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_fork (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/scalar_vfork (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) |