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
(6) |
2
(7) |
|
3
(12) |
4
(9) |
5
(12) |
6
(9) |
7
(18) |
8
(10) |
9
(17) |
|
10
(15) |
11
(22) |
12
(16) |
13
(18) |
14
(9) |
15
(14) |
16
(18) |
|
17
(24) |
18
(11) |
19
(15) |
20
(29) |
21
(19) |
22
(20) |
23
(9) |
|
24
(25) |
25
(25) |
26
(38) |
27
(22) |
28
(16) |
29
(17) |
|
|
From: Julian S. <js...@ac...> - 2008-02-12 23:55:18
|
On Tuesday 12 February 2008 11:10, Julian Seward wrote: > > Worth filing a bug for? > > I'd say yes, considering it's happening in an unpatched valgrind. It may or not be related to this: http://bugs.kde.org/show_bug.cgi?id=156065 J |
|
From: <sv...@va...> - 2008-02-12 21:55:12
|
Author: sewardj
Date: 2008-02-12 21:55:15 +0000 (Tue, 12 Feb 2008)
New Revision: 7404
Log:
Start tidying up (non-functional change):
* move stuff to do with Dwarf3 expression evaluation into
d3basics.c, a sane place for it
* get rid of VG_(get_error_tid) introduced in r7375 as it
is not necessary
* remove unneeded parameters from Memcheck's describe_addr function
Modified:
branches/DATASYMS/coregrind/m_debuginfo/d3basics.c
branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
branches/DATASYMS/coregrind/m_debuginfo/priv_d3basics.h
branches/DATASYMS/coregrind/m_debuginfo/priv_readdwarf3.h
branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c
branches/DATASYMS/coregrind/m_debuginfo/storage.c
branches/DATASYMS/coregrind/m_debuginfo/tytypes.c
branches/DATASYMS/coregrind/m_errormgr.c
branches/DATASYMS/include/pub_tool_errormgr.h
branches/DATASYMS/memcheck/mc_main.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/d3basics.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/d3basics.c 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/coregrind/m_debuginfo/d3basics.c 2008-02-12 21:55:15 UTC (rev 7404)
@@ -35,6 +35,10 @@
*/
#include "pub_core_basics.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcprint.h"
+#include "pub_core_options.h"
+
#include "priv_d3basics.h" /* self */
HChar* ML_(pp_DW_children) ( DW_children hashch )
@@ -307,6 +311,261 @@
}
+/* ------ To do with evaluation of Dwarf expressions ------ */
+
+/* FIXME: duplicated in readdwarf.c */
+static
+ULong read_leb128 ( UChar* data, Int* length_return, Int sign )
+{
+ ULong result = 0;
+ UInt num_read = 0;
+ Int shift = 0;
+ UChar byte;
+
+ vg_assert(sign == 0 || sign == 1);
+
+ do
+ {
+ byte = * data ++;
+ num_read ++;
+
+ result |= ((ULong)(byte & 0x7f)) << shift;
+
+ shift += 7;
+
+ }
+ while (byte & 0x80);
+
+ if (length_return != NULL)
+ * length_return = num_read;
+
+ if (sign && (shift < 64) && (byte & 0x40))
+ result |= -(1ULL << shift);
+
+ return result;
+}
+
+/* Small helper functions easier to use
+ * value is returned and the given pointer is
+ * moved past end of leb128 data */
+/* FIXME: duplicated in readdwarf.c */
+static ULong read_leb128U( UChar **data )
+{
+ Int len;
+ ULong val = read_leb128( *data, &len, 0 );
+ *data += len;
+ return val;
+}
+
+/* Same for signed data */
+/* FIXME: duplicated in readdwarf.c */
+static Long read_leb128S( UChar **data )
+{
+ Int len;
+ ULong val = read_leb128( *data, &len, 1 );
+ *data += len;
+ return (Long)val;
+}
+
+
+/* FIXME: duplicates logic in readdwarf.c: copy_convert_CfiExpr_tree
+ and {FP,SP}_REG decls */
+static Bool get_Dwarf_Reg( /*OUT*/Addr* a, Word regno, RegSummary* regs )
+{
+ vg_assert(regs);
+# if defined(VGP_amd64_linux)
+ if (regno == 6/*RBP*/) { *a = regs->fp; return True; }
+ if (regno == 7/*RSP*/) { *a = regs->sp; return True; }
+# elif defined(VGP_x86_linux)
+ if (regno == 5/*EBP*/) { *a = regs->fp; return True; }
+ if (regno == 4/*ESP*/) { *a = regs->sp; return True; }
+# else
+# error "Unknown platform"
+# endif
+ return False;
+}
+
+
+/* Evaluate a standard DWARF3 expression. See detailed description in
+ priv_d3basics.h. */
+GXResult ML_(evaluate_Dwarf3_Expr) ( UChar* expr, UWord exprszB,
+ GExpr* fbGX, RegSummary* regs,
+ Bool push_initial_zero )
+{
+# define N_EXPR_STACK 20
+
+# define FAIL(_str) \
+ do { \
+ GXResult res; \
+ res.res = 0; \
+ res.failure = (_str); \
+ return res; \
+ } while (0)
+
+# define PUSH(_arg) \
+ do { \
+ vg_assert(sp >= -1 && sp < N_EXPR_STACK); \
+ if (sp == N_EXPR_STACK-1) \
+ FAIL("evaluate_Dwarf3_Expr: stack overflow(1)"); \
+ sp++; \
+ stack[sp] = (_arg); \
+ } while (0)
+
+# define POP(_lval) \
+ do { \
+ vg_assert(sp >= -1 && sp < N_EXPR_STACK); \
+ if (sp == -1) \
+ FAIL("evaluate_Dwarf3_Expr: stack underflow(1)"); \
+ _lval = stack[sp]; \
+ sp--; \
+ } while (0)
+
+ UChar opcode;
+ UChar* limit;
+ Int sp; /* # of top element: valid is -1 .. N_EXPR_STACK-1 */
+ Addr stack[N_EXPR_STACK]; /* stack of addresses, as per D3 spec */
+ GXResult fbval;
+ Addr a1;
+ Word sw1;
+ UWord uw1;
+
+ sp = -1;
+ vg_assert(expr);
+ vg_assert(exprszB >= 0);
+ limit = expr + exprszB;
+
+ if (push_initial_zero)
+ PUSH(0);
+
+ while (True) {
+
+ vg_assert(sp >= -1 && sp < N_EXPR_STACK);
+
+ if (expr > limit)
+ /* overrun - something's wrong */
+ FAIL("evaluate_Dwarf3_Expr: ran off end of expr");
+
+ if (expr == limit) {
+ /* end of expr - return expr on the top of stack. */
+ if (sp == -1)
+ /* stack empty. Bad. */
+ FAIL("evaluate_Dwarf3_Expr: stack empty at end of expr");
+ else
+ break;
+ }
+
+ opcode = *expr++;
+ switch (opcode) {
+ case DW_OP_addr:
+ /* FIXME: surely this is an svma? Should be t- or d-
+ biased before being pushed? */
+ PUSH( *(Addr*)expr );
+ expr += sizeof(Addr);
+ break;
+ case DW_OP_fbreg:
+ if (!fbGX)
+ FAIL("evaluate_Dwarf3_Expr: DW_OP_fbreg with "
+ "no expr for fbreg present");
+ fbval = ML_(evaluate_GX)(fbGX, NULL, regs);
+ if (fbval.failure)
+ return fbval;
+ sw1 = (Word)read_leb128S( &expr );
+ PUSH( fbval.res + sw1 );
+ break;
+ case DW_OP_breg0 ... DW_OP_breg31:
+ if (!regs)
+ FAIL("evaluate_Dwarf3_Expr: DW_OP_breg* but no reg info");
+ a1 = 0;
+ if (!get_Dwarf_Reg( &a1, opcode - DW_OP_breg0, regs ))
+ FAIL("evaluate_Dwarf3_Expr: unhandled DW_OP_breg*");
+ sw1 = (Word)read_leb128S( &expr );
+ a1 += sw1;
+ PUSH( a1 );
+ break;
+ case DW_OP_plus_uconst:
+ POP(uw1);
+ uw1 += (UWord)read_leb128U( &expr );
+ PUSH(uw1);
+ break;
+ default:
+ if (!VG_(clo_xml))
+ VG_(message)(Vg_DebugMsg,
+ "Warning: DWARF3 CFI reader: unhandled DW_OP_ "
+ "opcode 0x%x", (Int)opcode);
+ FAIL("evaluate_Dwarf3_Expr: unhandled DW_OP_");
+ }
+
+ }
+
+ vg_assert(sp >= 0 && sp < N_EXPR_STACK);
+
+ { GXResult res;
+ res.res = stack[sp];
+ res.failure = NULL;
+ return res;
+ }
+
+# undef POP
+# undef PUSH
+# undef FAIL
+# undef N_EXPR_STACK
+}
+
+
+/* Evaluate a so-called Guarded (DWARF3) expression. See detailed
+ description in priv_d3basics.h. */
+GXResult ML_(evaluate_GX)( GExpr* gx, GExpr* fbGX, RegSummary* regs )
+{
+ GXResult res;
+ Addr aMin, aMax;
+ UChar uc;
+ UShort nbytes;
+ UWord nGuards = 0;
+ UChar* p = &gx->payload[0];
+ uc = *p++; /*biasMe*/
+ vg_assert(uc == 0 || uc == 1);
+ /* in fact it's senseless to evaluate if the guards need biasing.
+ So don't. */
+ vg_assert(uc == 0);
+ while (True) {
+ uc = *p++;
+ if (uc == 1) { /*isEnd*/
+ /* didn't find any matching range. */
+ res.res = 0;
+ res.failure = "no matching range";
+ return res;
+ }
+ vg_assert(uc == 0);
+ aMin = * (Addr*)p; p += sizeof(Addr);
+ aMax = * (Addr*)p; p += sizeof(Addr);
+ nbytes = * (UShort*)p; p += sizeof(UShort);
+ nGuards++;
+ if (regs == NULL) {
+ vg_assert(aMin == (Addr)0);
+ vg_assert(aMax == ~(Addr)0);
+ /* Assert this is the first guard. */
+ vg_assert(nGuards == 1);
+ res = ML_(evaluate_Dwarf3_Expr)(
+ p, (UWord)nbytes, fbGX, regs,
+ False/*push_initial_zero*/ );
+ /* Now check there are no more guards. */
+ p += (UWord)nbytes;
+ vg_assert(*p == 1); /*isEnd*/
+ return res;
+ } else {
+ if (aMin <= regs->ip && regs->ip <= aMax) {
+ /* found a matching range. Evaluate the expression. */
+ return ML_(evaluate_Dwarf3_Expr)(
+ p, (UWord)nbytes, fbGX, regs,
+ False/*push_initial_zero*/ );
+ }
+ }
+ /* else keep searching */
+ p += (UWord)nbytes;
+ }
+}
+
+
/*--------------------------------------------------------------------*/
/*--- end d3basics.c ---*/
/*--------------------------------------------------------------------*/
Modified: branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-12 21:55:15 UTC (rev 7404)
@@ -50,7 +50,9 @@
#include "pub_core_xarray.h"
#include "pub_core_oset.h"
#include "pub_core_stacktrace.h" // VG_(get_StackTrace)
+
#include "priv_misc.h" /* dinfo_zalloc/free */
+#include "priv_d3basics.h" /* ML_(pp_GX) */
#include "priv_tytypes.h"
#include "priv_storage.h"
#include "priv_readdwarf.h"
Modified: branches/DATASYMS/coregrind/m_debuginfo/priv_d3basics.h
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/priv_d3basics.h 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/coregrind/m_debuginfo/priv_d3basics.h 2008-02-12 21:55:15 UTC (rev 7404)
@@ -540,6 +540,93 @@
HChar* ML_(pp_DW_FORM) ( DW_FORM form );
HChar* ML_(pp_DW_AT) ( DW_AT attr );
+
+/* --- To do with evaluation of Dwarf expressions --- */
+
+/* Guarded Dwarf3 expressions, which can be linked together to form a
+ list. The payload field contains a variable length array of bytes
+ which hold the guarded expressions. The length can be inferred by
+ inspecting the payload bytes and so does not need to be stored
+ explicitly.
+
+ Guarded-Expression format is similar but not identical to the
+ DWARF3 location-list format. The format of each returned block is:
+
+ UChar biasMe;
+ UChar isEnd;
+ followed by zero or more of
+
+ (Addr aMin; Addr aMax; UShort nbytes; ..bytes..; UChar isEnd)
+
+ '..bytes..' is an standard DWARF3 location expression which is
+ valid when aMin <= pc <= aMax (possibly after suitable biasing).
+
+ The number of bytes in '..bytes..' is nbytes.
+
+ The end of the sequence is marked by an isEnd == 1 value. All
+ previous isEnd values must be zero.
+
+ biasMe is 1 if the aMin/aMax fields need this DebugInfo's text_bias
+ added before use, and 0 if the GX is this is not necessary (is
+ ready to go).
+
+ Hence the block can be quickly parsed and is self-describing. Note
+ that aMax is 1 less than the corresponding value in a DWARF3
+ location list. Zero length ranges, with aMax == aMin-1, are not
+ allowed.
+*/
+typedef
+ struct _GExpr {
+ struct _GExpr* next;
+ UChar payload[0];
+ }
+ GExpr;
+
+/* Show a so-called guarded expression */
+void ML_(pp_GX) ( GExpr* gx );
+
+/* Evaluation of a DWARF3 expression (and hence of a GExpr) may
+ require knowing a suitably contextualising set of values for the
+ instruction, frame and stack pointer (and, in general, all
+ registers, though we punt on such generality here). Here's a
+ struct to carry the bare essentials. */
+typedef
+ struct { Addr ip; Addr sp; Addr fp; }
+ RegSummary;
+
+/* This describes the result of evaluating a DWARF3 expression. If
+ .failure is NULL, then evaluation succeeded and produced .res as
+ the result. Else .failure is a zero terminated const string
+ summarising the reason for failure. */
+typedef
+ struct { UWord res; HChar* failure; }
+ GXResult;
+
+/* Evaluate a guarded expression. If regs is NULL, then gx is assumed
+ (and checked) to contain just a single guarded expression, which a
+ guard which covers the entire address space and so always evaluates
+ to True (iow, gx is a single unconditional expression). If regs is
+ non-NULL then its 'ip' value is used to select which of the
+ embedded DWARF3 location expressions to use, and that is duly
+ evaluated.
+
+ If as part of the evaluation, a frame base value needs to be
+ computed, then fbGX can provide an expression for it. If fbGX is
+ NULL but the frame base is still needed, then evaluation of gx as a
+ whole will fail. */
+GXResult ML_(evaluate_GX)( GExpr* gx, GExpr* fbGX, RegSummary* regs );
+
+/* This is a subsidiary of ML_(evaluate_GX), which just evaluates a
+ single standard DWARF3 expression. Conventions w.r.t regs and fbGX
+ are as for ML_(evaluate_GX). If push_initial_zero is True, then an
+ initial zero word is pushed on the evaluation stack at the start.
+ This is needed for computing structure field offsets. Note that
+ ML_(evaluate_GX) and ML_(evaluate_Dwarf3_Expr) are mutually
+ recursive. */
+GXResult ML_(evaluate_Dwarf3_Expr) ( UChar* expr, UWord exprszB,
+ GExpr* fbGX, RegSummary* regs,
+ Bool push_initial_zero );
+
#endif /* ndef __PRIV_D3BASICS_H */
/*--------------------------------------------------------------------*/
Modified: branches/DATASYMS/coregrind/m_debuginfo/priv_readdwarf3.h
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/priv_readdwarf3.h 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/coregrind/m_debuginfo/priv_readdwarf3.h 2008-02-12 21:55:15 UTC (rev 7404)
@@ -50,29 +50,6 @@
UChar* debug_loc_img, SizeT debug_loc_sz
);
-typedef
- struct _GExpr {
- struct _GExpr* next;
- UChar payload[0];
- }
- GExpr;
-
-/* Show a so-called guarded expression */
-void ML_(pp_GX) ( GExpr* gx );
-
-/* Evaluate a guarded expression, using 'ip' to select which of the
- embedded DWARF3 location expressions to use. */
-
-typedef
- struct { Addr ip; Addr sp; Addr fp; }
- RegSummary;
-
-typedef
- struct { UWord res; HChar* failure; }
- GXResult;
-
-GXResult ML_(evaluate_GX)( GExpr* gx, GExpr* fbGX, RegSummary* regs );
-
#endif /* ndef __PRIV_READDWARF3_H */
/*--------------------------------------------------------------------*/
Modified: branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c 2008-02-12 21:55:15 UTC (rev 7404)
@@ -442,257 +442,6 @@
}
}
-/* FIXME: duplicated in readdwarf.c */
-static
-ULong read_leb128 ( UChar* data, Int* length_return, Int sign )
-{
- ULong result = 0;
- UInt num_read = 0;
- Int shift = 0;
- UChar byte;
-
- vg_assert(sign == 0 || sign == 1);
-
- do
- {
- byte = * data ++;
- num_read ++;
-
- result |= ((ULong)(byte & 0x7f)) << shift;
-
- shift += 7;
-
- }
- while (byte & 0x80);
-
- if (length_return != NULL)
- * length_return = num_read;
-
- if (sign && (shift < 64) && (byte & 0x40))
- result |= -(1ULL << shift);
-
- return result;
-}
-
-/* Small helper functions easier to use
- * value is returned and the given pointer is
- * moved past end of leb128 data */
-/* FIXME: duplicated in readdwarf.c */
-static ULong read_leb128U( UChar **data )
-{
- Int len;
- ULong val = read_leb128( *data, &len, 0 );
- *data += len;
- return val;
-}
-
-/* Same for signed data */
-/* FIXME: duplicated in readdwarf.c */
-static Long read_leb128S( UChar **data )
-{
- Int len;
- ULong val = read_leb128( *data, &len, 1 );
- *data += len;
- return (Long)val;
-}
-
-/* FIXME: duplicates logic in readdwarf.c: copy_convert_CfiExpr_tree
- and {FP,SP}_REG decls */
-static Bool get_Dwarf_Reg( /*OUT*/Addr* a, Word regno, RegSummary* regs )
-{
- vg_assert(regs);
-# if defined(VGP_amd64_linux)
- if (regno == 6/*RBP*/) { *a = regs->fp; return True; }
- if (regno == 7/*RSP*/) { *a = regs->sp; return True; }
-# elif defined(VGP_x86_linux)
- if (regno == 5/*EBP*/) { *a = regs->fp; return True; }
- if (regno == 4/*ESP*/) { *a = regs->sp; return True; }
-# else
-# error "Unknown platform"
-# endif
- return False;
-}
-
-
-//static
-GXResult evaluate_Dwarf3_Expr ( UChar* expr, UWord exprszB,
- GExpr* fbGX, RegSummary* regs,
- Bool push_initial_zero )
-{
-# define N_EXPR_STACK 20
-
-# define FAIL(_str) \
- do { \
- GXResult res; \
- res.res = 0; \
- res.failure = (_str); \
- return res; \
- } while (0)
-
-# define PUSH(_arg) \
- do { \
- vg_assert(sp >= -1 && sp < N_EXPR_STACK); \
- if (sp == N_EXPR_STACK-1) \
- FAIL("evaluate_Dwarf3_Expr: stack overflow(1)"); \
- sp++; \
- stack[sp] = (_arg); \
- } while (0)
-
-# define POP(_lval) \
- do { \
- vg_assert(sp >= -1 && sp < N_EXPR_STACK); \
- if (sp == -1) \
- FAIL("evaluate_Dwarf3_Expr: stack underflow(1)"); \
- _lval = stack[sp]; \
- sp--; \
- } while (0)
-
- UChar opcode;
- UChar* limit;
- Int sp; /* # of top element: valid is -1 .. N_EXPR_STACK-1 */
- Addr stack[N_EXPR_STACK]; /* stack of addresses, as per D3 spec */
- GXResult fbval;
- Addr a1;
- Word sw1;
- UWord uw1;
-
- sp = -1;
- vg_assert(expr);
- vg_assert(exprszB >= 0);
- limit = expr + exprszB;
-
- if (push_initial_zero)
- PUSH(0);
-
- while (True) {
-
- vg_assert(sp >= -1 && sp < N_EXPR_STACK);
-
- if (expr > limit)
- /* overrun - something's wrong */
- FAIL("evaluate_Dwarf3_Expr: ran off end of expr");
-
- if (expr == limit) {
- /* end of expr - return expr on the top of stack. */
- if (sp == -1)
- /* stack empty. Bad. */
- FAIL("evaluate_Dwarf3_Expr: stack empty at end of expr");
- else
- break;
- }
-
- opcode = *expr++;
- switch (opcode) {
- case DW_OP_addr:
- /* FIXME: surely this is an svma? Should be t- or d-
- biased before being pushed? */
- PUSH( *(Addr*)expr );
- expr += sizeof(Addr);
- break;
- case DW_OP_fbreg:
- if (!fbGX)
- FAIL("evaluate_Dwarf3_Expr: DW_OP_fbreg with "
- "no expr for fbreg present");
- fbval = ML_(evaluate_GX)(fbGX, NULL, regs);
- if (fbval.failure)
- return fbval;
- sw1 = (Word)read_leb128S( &expr );
- PUSH( fbval.res + sw1 );
- break;
- case DW_OP_breg0 ... DW_OP_breg31:
- if (!regs)
- FAIL("evaluate_Dwarf3_Expr: DW_OP_breg* but no reg info");
- a1 = 0;
- if (!get_Dwarf_Reg( &a1, opcode - DW_OP_breg0, regs ))
- FAIL("evaluate_Dwarf3_Expr: unhandled DW_OP_breg*");
- sw1 = (Word)read_leb128S( &expr );
- a1 += sw1;
- PUSH( a1 );
- break;
- case DW_OP_plus_uconst:
- POP(uw1);
- uw1 += (UWord)read_leb128U( &expr );
- PUSH(uw1);
- break;
- default:
- if (!VG_(clo_xml))
- VG_(message)(Vg_DebugMsg,
- "Warning: DWARF3 CFI reader: unhandled DW_OP_ "
- "opcode 0x%x", (Int)opcode);
- FAIL("evaluate_Dwarf3_Expr: unhandled DW_OP_");
- }
-
- }
-
- vg_assert(sp >= 0 && sp < N_EXPR_STACK);
-
- { GXResult res;
- res.res = stack[sp];
- res.failure = NULL;
- return res;
- }
-
-# undef POP
-# undef PUSH
-# undef FAIL
-# undef N_EXPR_STACK
-}
-
-/* Evaluate a guarded expression, using regs->ip to select which of
- the embedded DWARF3 location expressions to use. If regs is NULL,
- then we assume (and check) that there is only one guard and that it
- covers the entire address range, i.o.w. that there's only one guard
- and it always evaluates to True, so we don't need to know
- regs->ip. */
-GXResult ML_(evaluate_GX)( GExpr* gx, GExpr* fbGX, RegSummary* regs )
-{
- GXResult res;
- Addr aMin, aMax;
- UChar uc;
- UShort nbytes;
- UWord nGuards = 0;
- UChar* p = &gx->payload[0];
- uc = *p++; /*biasMe*/
- vg_assert(uc == 0 || uc == 1);
- /* in fact it's senseless to evaluate if the guards need biasing.
- So don't. */
- vg_assert(uc == 0);
- while (True) {
- uc = *p++;
- if (uc == 1) { /*isEnd*/
- /* didn't find any matching range. */
- res.res = 0;
- res.failure = "no matching range";
- return res;
- }
- vg_assert(uc == 0);
- aMin = * (Addr*)p; p += sizeof(Addr);
- aMax = * (Addr*)p; p += sizeof(Addr);
- nbytes = * (UShort*)p; p += sizeof(UShort);
- nGuards++;
- if (regs == NULL) {
- vg_assert(aMin == (Addr)0);
- vg_assert(aMax == ~(Addr)0);
- /* Assert this is the first guard. */
- vg_assert(nGuards == 1);
- res = evaluate_Dwarf3_Expr( p, (UWord)nbytes, fbGX, regs,
- False/*push_initial_zero*/ );
- /* Now check there are no more guards. */
- p += (UWord)nbytes;
- vg_assert(*p == 1); /*isEnd*/
- return res;
- } else {
- if (aMin <= regs->ip && regs->ip <= aMax) {
- /* found a matching range. Evaluate the expression. */
- return evaluate_Dwarf3_Expr( p, (UWord)nbytes, fbGX, regs,
- False/*push_initial_zero*/ );
- }
- }
- /* else keep searching */
- p += (UWord)nbytes;
- }
-}
-
__attribute__((noinline))
static GExpr* make_singleton_GX ( UChar* block, UWord nbytes )
{
Modified: branches/DATASYMS/coregrind/m_debuginfo/storage.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/storage.c 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/coregrind/m_debuginfo/storage.c 2008-02-12 21:55:15 UTC (rev 7404)
@@ -45,15 +45,12 @@
#include "pub_core_xarray.h"
#include "pub_core_oset.h"
+#include "priv_misc.h" /* dinfo_zalloc/free/strdup */
+#include "priv_d3basics.h" /* ML_(pp_GX) */
#include "priv_tytypes.h"
#include "priv_storage.h" /* self */
-//FIXME: get rid of this
-#include "priv_readdwarf3.h" // ML_(pp_GX)
-#include "priv_misc.h" /* dinfo_zalloc/free/strdup */
-
-
/*------------------------------------------------------------*/
/*--- Misc (printing, errors) ---*/
/*------------------------------------------------------------*/
Modified: branches/DATASYMS/coregrind/m_debuginfo/tytypes.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/tytypes.c 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/coregrind/m_debuginfo/tytypes.c 2008-02-12 21:55:15 UTC (rev 7404)
@@ -38,15 +38,11 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcprint.h"
#include "pub_core_xarray.h" /* to keep priv_tytypes.h happy */
+
#include "priv_misc.h" /* dinfo_zalloc/free/strdup */
+#include "priv_d3basics.h" /* ML_(evaluate_Dwarf3_Expr) et al */
#include "priv_tytypes.h" /* self */
-///////////////// HACK - get rid of this
-#include "priv_readdwarf3.h" // GXResult
-GXResult evaluate_Dwarf3_Expr ( UChar* expr, UWord exprszB,
- GExpr* fbGX, RegSummary* regs,
- Bool push_initial_zero );
-/////////////////
TyAdmin* ML_(new_TyAdmin) ( UWord cuOff, TyAdmin* next ) {
TyAdmin* admin = ML_(dinfo_zalloc)( sizeof(TyAdmin) );
@@ -369,7 +365,7 @@
field = *(TyField**)VG_(indexXA)( fields, i );
vg_assert(field);
vg_assert(field->loc);
- res = evaluate_Dwarf3_Expr(
+ res = ML_(evaluate_Dwarf3_Expr)(
field->loc->bytes, field->loc->nbytes,
NULL/*fbGX*/, NULL/*RegSummary*/,
True/*push_initial_zero*/ );
Modified: branches/DATASYMS/coregrind/m_errormgr.c
===================================================================
--- branches/DATASYMS/coregrind/m_errormgr.c 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/coregrind/m_errormgr.c 2008-02-12 21:55:15 UTC (rev 7404)
@@ -130,16 +130,6 @@
};
-
-/* Note, VG_(get_error_tid) only produces a meaningful result at the
- time that the error is handed to VG_(maybe_record_error), since the
- same tid may be reassigned later to a new thread. Caveat
- Caller. */
-ThreadId VG_(get_error_tid) ( Error* err )
-{
- return err->tid;
-}
-
ExeContext* VG_(get_error_where) ( Error* err )
{
return err->where;
Modified: branches/DATASYMS/include/pub_tool_errormgr.h
===================================================================
--- branches/DATASYMS/include/pub_tool_errormgr.h 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/include/pub_tool_errormgr.h 2008-02-12 21:55:15 UTC (rev 7404)
@@ -55,11 +55,7 @@
Error;
/* Useful in VG_(tdict).tool_error_matches_suppression(),
- * VG_(tdict).tool_pp_Error(), etc. Note, VG_(get_error_tid) only
- produces a meaningful result at the time that the error is
- handed to VG_(maybe_record_error), since the same tid may be
- reassigned later to a new thread. Caveat Caller. */
-ThreadId VG_(get_error_tid) ( Error* err );
+ * VG_(tdict).tool_pp_Error(), etc */
ExeContext* VG_(get_error_where) ( Error* err );
ErrorKind VG_(get_error_kind) ( Error* err );
Addr VG_(get_error_address) ( Error* err );
Modified: branches/DATASYMS/memcheck/mc_main.c
===================================================================
--- branches/DATASYMS/memcheck/mc_main.c 2008-02-12 20:18:11 UTC (rev 7403)
+++ branches/DATASYMS/memcheck/mc_main.c 2008-02-12 21:55:15 UTC (rev 7404)
@@ -3376,12 +3376,7 @@
/* Describe an address as best you can, for error messages,
putting the result in ai. */
-static void describe_addr ( Addr a,
- /* FIXME: get rid of the next 3 args */
- Addr ip_at_error,
- Addr sp_at_error,
- Addr fp_at_error,
- /*OUT*/AddrInfo* ai )
+static void describe_addr ( Addr a, /*OUT*/AddrInfo* ai )
{
MC_Chunk* mc;
ThreadId tid;
@@ -3486,11 +3481,6 @@
{
MC_Error* extra = VG_(get_error_extra)(err);
- ThreadId tid = VG_(get_error_tid)(err);
- Addr ip_at_error = VG_(get_IP)( tid );
- Addr sp_at_error = VG_(get_SP)( tid );
- Addr fp_at_error = VG_(get_FP)( tid );
-
switch (VG_(get_error_kind)(err)) {
// These ones don't have addresses associated with them, and so don't
// need any updating.
@@ -3500,40 +3490,34 @@
case Err_Overlap:
case Err_RegParam:
// For Err_Leaks the returned size does not matter -- they are always
- // shown with VG_(unique_error)() so they 'extra' not copied. But we make it
- // consistent with the others.
+ // shown with VG_(unique_error)() so they 'extra' not copied. But
+ // we make it consistent with the others.
case Err_Leak:
return sizeof(MC_Error);
// These ones always involve a memory address.
case Err_Addr:
describe_addr ( VG_(get_error_address)(err),
- ip_at_error, sp_at_error, fp_at_error,
&extra->Err.Addr.ai );
return sizeof(MC_Error);
case Err_MemParam:
describe_addr ( VG_(get_error_address)(err),
- ip_at_error, sp_at_error, fp_at_error,
&extra->Err.MemParam.ai );
return sizeof(MC_Error);
case Err_Jump:
describe_addr ( VG_(get_error_address)(err),
- ip_at_error, sp_at_error, fp_at_error,
&extra->Err.Jump.ai );
return sizeof(MC_Error);
case Err_User:
describe_addr ( VG_(get_error_address)(err),
- ip_at_error, sp_at_error, fp_at_error,
&extra->Err.User.ai );
return sizeof(MC_Error);
case Err_Free:
describe_addr ( VG_(get_error_address)(err),
- ip_at_error, sp_at_error, fp_at_error,
&extra->Err.Free.ai );
return sizeof(MC_Error);
case Err_IllegalMempool:
describe_addr ( VG_(get_error_address)(err),
- ip_at_error, sp_at_error, fp_at_error,
&extra->Err.IllegalMempool.ai );
return sizeof(MC_Error);
|
|
From: <sv...@va...> - 2008-02-12 20:18:11
|
Author: sewardj
Date: 2008-02-12 20:18:11 +0000 (Tue, 12 Feb 2008)
New Revision: 7403
Log:
Format descriptions of data addresses in a better way.
Modified:
branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
branches/DATASYMS/coregrind/m_debuginfo/priv_tytypes.h
branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c
branches/DATASYMS/coregrind/m_debuginfo/tytypes.c
branches/DATASYMS/include/pub_tool_debuginfo.h
branches/DATASYMS/memcheck/mc_main.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-12 13:54:28 UTC (rev 7402)
+++ branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-12 20:18:11 UTC (rev 7403)
@@ -999,13 +999,169 @@
}
}
+
+/* Format the acquired information into dname1[0 .. n_dname-1] and
+ dname2[0 .. n_dname-1] in an understandable way. Not so easy.
+ If frameNo is -1, this is assumed to be a global variable; else
+ a local variable. */
+static void format_message ( /*OUT*/Char* dname1,
+ /*OUT*/Char* dname2,
+ Int n_dname,
+ Addr data_addr,
+ DiVariable* var,
+ OffT var_offset,
+ OffT residual_offset,
+ XArray* /*UChar*/ described,
+ Int frameNo,
+ ThreadId tid )
+{
+ Bool have_descr, have_srcloc;
+ UChar* vo_plural = var_offset == 1 ? "" : "s";
+ UChar* ro_plural = residual_offset == 1 ? "" : "s";
+
+ vg_assert(frameNo >= -1);
+ vg_assert(dname1 && dname2 && n_dname > 1);
+ vg_assert(described);
+ vg_assert(var && var->name);
+ have_descr = VG_(sizeXA)(described) > 0
+ && *(UChar*)VG_(indexXA)(described,0) != '\0';
+ have_srcloc = var->fileName && var->lineNo > 0;
+
+ dname1[0] = dname2[0] = '\0';
+
+ /* ------ local cases ------ */
+
+ if ( frameNo >= 0 && (!have_srcloc) && (!have_descr) ) {
+ /* no srcloc, no description:
+ Address 0x7fefff6cf is 543 bytes inside local var "a",
+ in frame #1 of thread 1
+ */
+ VG_(snprintf)(
+ dname1, n_dname,
+ "Address 0x%lx is %lu byte%s inside local var \"%s\",",
+ data_addr, var_offset, vo_plural, var->name );
+ VG_(snprintf)(
+ dname2, n_dname,
+ "in frame #%d of thread %d", frameNo, (Int)tid);
+ }
+ else
+ if ( frameNo >= 0 && have_srcloc && (!have_descr) ) {
+ /* no description:
+ Address 0x7fefff6cf is 543 bytes inside local var "a"
+ declared at dsyms7.c:17, in frame #1 of thread 1
+ */
+ VG_(snprintf)(
+ dname1, n_dname,
+ "Address 0x%lx is %lu byte%s inside local var \"%s\"",
+ data_addr, var_offset, vo_plural, var->name );
+ VG_(snprintf)(
+ dname2, n_dname,
+ "declared at %s:%d, in frame #%d of thread %d",
+ var->fileName, var->lineNo, frameNo, (Int)tid);
+ }
+ else
+ if ( frameNo >= 0 && (!have_srcloc) && have_descr ) {
+ /* no srcloc:
+ Address 0x7fefff6cf is 2 bytes inside a[3].xyzzy[21].c2
+ in frame #1 of thread 1
+ */
+ VG_(snprintf)(
+ dname1, n_dname,
+ "Address 0x%lx is %lu byte%s inside %s%s",
+ data_addr, residual_offset, ro_plural, var->name,
+ VG_(indexXA)(described,0) );
+ VG_(snprintf)(
+ dname2, n_dname,
+ "in frame #%d of thread %d", frameNo, (Int)tid);
+ }
+ else
+ if ( frameNo >= 0 && have_srcloc && have_descr ) {
+ /* Address 0x7fefff6cf is 2 bytes inside a[3].xyzzy[21].c2,
+ declared at dsyms7.c:17, in frame #1 of thread 1 */
+ VG_(snprintf)(
+ dname1, n_dname,
+ "Address 0x%lx is %lu byte%s inside %s%s,",
+ data_addr, residual_offset, ro_plural, var->name,
+ VG_(indexXA)(described,0) );
+ VG_(snprintf)(
+ dname2, n_dname,
+ "declared at %s:%d, in frame #%d of thread %d",
+ var->fileName, var->lineNo, frameNo, (Int)tid);
+ }
+ else
+ /* ------ global cases ------ */
+ if ( frameNo >= -1 && (!have_srcloc) && (!have_descr) ) {
+ /* no srcloc, no description:
+ Address 0x7fefff6cf is 543 bytes inside global var "a"
+ */
+ VG_(snprintf)(
+ dname1, n_dname,
+ "Address 0x%lx is %lu byte%s inside global var \"%s\"",
+ data_addr, var_offset, vo_plural, var->name );
+ }
+ else
+ if ( frameNo >= -1 && have_srcloc && (!have_descr) ) {
+ /* no description:
+ Address 0x7fefff6cf is 543 bytes inside global var "a"
+ declared at dsyms7.c:17
+ */
+ VG_(snprintf)(
+ dname1, n_dname,
+ "Address 0x%lx is %lu byte%s inside global var \"%s\"",
+ data_addr, var_offset, vo_plural, var->name );
+ VG_(snprintf)(
+ dname2, n_dname,
+ "declared at %s:%d",
+ var->fileName, var->lineNo);
+ }
+ else
+ if ( frameNo >= -1 && (!have_srcloc) && have_descr ) {
+ /* no srcloc:
+ Address 0x7fefff6cf is 2 bytes inside a[3].xyzzy[21].c2,
+ a global variable
+ */
+ VG_(snprintf)(
+ dname1, n_dname,
+ "Address 0x%lx is %lu byte%s inside %s%s,",
+ data_addr, residual_offset, ro_plural, var->name,
+ VG_(indexXA)(described,0) );
+ VG_(snprintf)(
+ dname2, n_dname,
+ "a global variable");
+ }
+ else
+ if ( frameNo >= -1 && have_srcloc && have_descr ) {
+ /* Address 0x7fefff6cf is 2 bytes inside a[3].xyzzy[21].c2,
+ a global variable declared at dsyms7.c:17 */
+ VG_(snprintf)(
+ dname1, n_dname,
+ "Address 0x%lx is %lu byte%s inside %s%s,",
+ data_addr, residual_offset, ro_plural, var->name,
+ VG_(indexXA)(described,0) );
+ VG_(snprintf)(
+ dname2, n_dname,
+ "a global variable declared at %s:%d",
+ var->fileName, var->lineNo);
+ }
+ else
+ vg_assert(0);
+
+ dname1[n_dname-1] = dname2[n_dname-1] = 0;
+}
+
+
/* Determine if data_addr is a local variable in the frame
characterised by (ip,sp,fp), and if so write its description into
- dname[0..n_dname-1], and return True. If not, return False. */
+ dname{1,2}[0..n_dname-1], and return True. If not, return
+ False. */
static
-Bool consider_vars_in_frame ( /*OUT*/Char* dname, Int n_dname,
+Bool consider_vars_in_frame ( /*OUT*/Char* dname1,
+ /*OUT*/Char* dname2,
+ Int n_dname,
Addr data_addr,
- Addr ip, Addr sp, Addr fp )
+ Addr ip, Addr sp, Addr fp,
+ /* shown to user: */
+ ThreadId tid, Int frameNo )
{
Word i;
DebugInfo* di;
@@ -1091,14 +1247,13 @@
DiVariable* var = (DiVariable*)VG_(indexXA)( vars, j );
SizeT offset;
if (data_address_is_in_var( &offset, var, ®s, data_addr )) {
- XArray* xa = ML_(describe_type)( var->type, offset );
- VG_(snprintf)(
- dname, (SizeT)n_dname,
- "Address 0x%lx is %lu bytes inside local var "
- "\"%s\" (%s) declared at %s:%d",
- data_addr, offset, var->name, VG_(indexXA)(xa,0),
- var->fileName ? var->fileName : "(unknown)", var->lineNo );
- dname[n_dname-1] = 0;
+ OffT residual_offset = 0;
+ XArray* described = ML_(describe_type)( &residual_offset,
+ var->type, offset );
+ format_message( dname1, dname2, n_dname,
+ data_addr, var, offset, residual_offset,
+ described, frameNo, tid );
+ VG_(deleteXA)( described );
return True;
}
}
@@ -1110,10 +1265,12 @@
/* Try to form some description of data_addr by looking at the DWARF3
debug info we have. This considers all global variables, and all
frames in the stacks of all threads. Result (or as much as will
- fit) is put into into dname[0 .. n_dname-1] and is guaranteed to be
- zero terminated. */
-Bool VG_(get_data_description)( Addr data_addr,
- /*OUT*/Char* dname, Int n_dname )
+ fit) is put into into dname{1,2}[0 .. n_dname-1] and is guaranteed
+ to be zero terminated. */
+Bool VG_(get_data_description)( /*OUT*/Char* dname1,
+ /*OUT*/Char* dname2,
+ Int n_dname,
+ Addr data_addr )
{
# define N_FRAMES 8
Addr ips[N_FRAMES], sps[N_FRAMES], fps[N_FRAMES];
@@ -1126,7 +1283,7 @@
Word j;
vg_assert(n_dname > 1);
- dname[n_dname-1] = 0;
+ dname1[n_dname-1] = dname2[n_dname-1] = 0;
if (0) VG_(printf)("GDD: dataaddr %p\n", data_addr);
@@ -1189,11 +1346,14 @@
if (data_address_is_in_var( &offset, var,
NULL/* RegSummary* */,
data_addr )) {
- VG_(snprintf)(
- dname, (SizeT)n_dname,
- "Address 0x%lx is %lu bytes inside global var \"%s\"",
- data_addr, offset, var->name);
- dname[n_dname-1] = 0;
+ OffT residual_offset = 0;
+ XArray* described = ML_(describe_type)( &residual_offset,
+ var->type, offset );
+ format_message( dname1, dname2, n_dname,
+ data_addr, var, offset, residual_offset,
+ described, -1/*frameNo*/, tid );
+ VG_(deleteXA)( described );
+ dname1[n_dname-1] = dname2[n_dname-1] = 0;
return True;
}
}
@@ -1215,8 +1375,10 @@
break;
}
}
- if (!found)
+ if (!found) {
+ dname1[n_dname-1] = dname2[n_dname-1] = 0;
return False;
+ }
/* We conclude data_addr is in thread tid's stack. Unwind the
stack to get a bunch of (ip,sp,fp) triples describing the
@@ -1226,15 +1388,16 @@
sps, fps, 0/*first_ip_delta*/ );
vg_assert(n_frames >= 0 && n_frames <= N_FRAMES);
for (j = 0; j < n_frames; j++) {
- if (consider_vars_in_frame( dname, n_dname,
+ if (consider_vars_in_frame( dname1, dname2, n_dname,
data_addr,
- ips[j], sps[j], fps[j] )) {
- dname[n_dname-1] = 0;
+ ips[j], sps[j], fps[j], tid, j )) {
+ dname1[n_dname-1] = dname2[n_dname-1] = 0;
return True;
}
}
/* We didn't find anything useful. */
+ dname1[n_dname-1] = dname2[n_dname-1] = 0;
return False;
# undef N_FRAMES
}
Modified: branches/DATASYMS/coregrind/m_debuginfo/priv_tytypes.h
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/priv_tytypes.h 2008-02-12 13:54:28 UTC (rev 7402)
+++ branches/DATASYMS/coregrind/m_debuginfo/priv_tytypes.h 2008-02-12 20:18:11 UTC (rev 7403)
@@ -151,8 +151,10 @@
/* FIXME: check all pointers before dereferencing */
SizeT ML_(sizeOfType)( Type* ty );
-/* Describe where in the type 'offset' falls. */
-XArray* /*UChar*/ ML_(describe_type)( Type* ty, OffT offset );
+/* Describe where in the type 'offset' falls. Caller must
+ deallocate the resulting XArray. */
+XArray* /*UChar*/ ML_(describe_type)( /*OUT*/OffT* residual_offset,
+ Type* ty, OffT offset );
#endif /* ndef __PRIV_TYTYPES_H */
Modified: branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c 2008-02-12 13:54:28 UTC (rev 7402)
+++ branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c 2008-02-12 20:18:11 UTC (rev 7403)
@@ -1350,7 +1350,19 @@
CUConst* cc, UWord debug_line_offset,
Bool td3 )
{
+ Bool is_dw64;
Cursor c;
+ Word i;
+ ULong unit_length;
+ UShort version;
+ ULong header_length;
+ UChar minimum_instruction_length;
+ UChar default_is_stmt;
+ Char line_base;
+ UChar line_range;
+ UChar opcode_base;
+ UChar* str;
+
vg_assert(parser && cc && cc->barf);
if ((!cc->debug_line_img)
|| cc->debug_line_sz <= debug_line_offset)
@@ -1360,20 +1372,20 @@
cc->debug_line_sz, debug_line_offset, cc->barf,
"Overrun whilst reading .debug_line section(1)" );
- Bool is_dw64;
- ULong unit_length = get_Initial_Length( &is_dw64, &c, "read_filename_table: invalid initial-length field" );
- UShort version = get_UShort( &c );
+ unit_length
+ = get_Initial_Length( &is_dw64, &c,
+ "read_filename_table: invalid initial-length field" );
+ version = get_UShort( &c );
if (version != 2)
cc->barf("read_filename_table: Only DWARF version 2 line info "
"is currently supported.");
- ULong header_length = (ULong)get_Dwarfish_UWord( &c, is_dw64 );
- UChar minimum_instruction_length = get_UChar( &c );
- UChar default_is_stmt = get_UChar( &c );
- Char line_base = (Char)get_UChar( &c );
- UChar line_range = get_UChar( &c );
- UChar opcode_base = get_UChar( &c );
+ header_length = (ULong)get_Dwarfish_UWord( &c, is_dw64 );
+ minimum_instruction_length = get_UChar( &c );
+ default_is_stmt = get_UChar( &c );
+ line_base = (Char)get_UChar( &c );
+ line_range = get_UChar( &c );
+ opcode_base = get_UChar( &c );
/* skip over "standard_opcode_lengths" */
- Word i;
for (i = 1; i < (Word)opcode_base; i++)
(void)get_UChar( &c );
@@ -1388,7 +1400,7 @@
vg_assert( VG_(sizeXA)( parser->filenameTable ) == 0 );
/* Add a dummy index-zero entry. DWARF3 numbers its files
from 1, for some reason. */
- UChar* str = ML_(dinfo_strdup)( "<unknown>" );;
+ str = ML_(dinfo_strdup)( "<unknown>" );;
VG_(addToXA)( parser->filenameTable, &str );
while (peek_UChar(&c) != 0) {
str = get_AsciiZ(&c);
Modified: branches/DATASYMS/coregrind/m_debuginfo/tytypes.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/tytypes.c 2008-02-12 13:54:28 UTC (rev 7402)
+++ branches/DATASYMS/coregrind/m_debuginfo/tytypes.c 2008-02-12 20:18:11 UTC (rev 7403)
@@ -340,7 +340,10 @@
}
-XArray* /*UChar*/ ML_(describe_type)( Type* ty, OffT offset )
+/* Describe where in the type 'offset' falls. Caller must
+ deallocate the resulting XArray. */
+XArray* /*UChar*/ ML_(describe_type)( /*OUT*/OffT* residual_offset,
+ Type* ty, OffT offset )
{
XArray* xa = VG_(newXA)( ML_(dinfo_zalloc), ML_(dinfo_free),
sizeof(UChar) );
@@ -447,10 +450,7 @@
}
done:
- if (offset > 0) {
- copy_bytes_into_XA( xa, " +", 2 );
- copy_UWord_into_XA( xa, offset );
- }
+ *residual_offset = offset;
copy_bytes_into_XA( xa, "\0", 1 );
return xa;
}
Modified: branches/DATASYMS/include/pub_tool_debuginfo.h
===================================================================
--- branches/DATASYMS/include/pub_tool_debuginfo.h 2008-02-12 13:54:28 UTC (rev 7402)
+++ branches/DATASYMS/include/pub_tool_debuginfo.h 2008-02-12 20:18:11 UTC (rev 7403)
@@ -85,10 +85,12 @@
/* Try to form some description of data_addr by looking at the DWARF3
debug info we have. This considers all global variables, and all
frames in the stacks of all threads. Result (or as much as will
- fit) is put into into dname[0 .. n_dname-1] and is guaranteed to be
- zero terminated. */
-extern Bool VG_(get_data_description)( Addr data_addr,
- /*OUT*/Char* dname, Int n_dname );
+ fit) is put into into dname{1,2}[0 .. n_dname-1] and is guaranteed
+ to be zero terminated. */
+extern Bool VG_(get_data_description)( /*OUT*/Char* dname1,
+ /*OUT*/Char* dname2,
+ Int n_dname,
+ Addr data_addr );
/* Succeeds if the address is within a shared object or the main executable.
It doesn't matter if debug info is present or not. */
Modified: branches/DATASYMS/memcheck/mc_main.c
===================================================================
--- branches/DATASYMS/memcheck/mc_main.c 2008-02-12 13:54:28 UTC (rev 7402)
+++ branches/DATASYMS/memcheck/mc_main.c 2008-02-12 20:18:11 UTC (rev 7403)
@@ -2668,9 +2668,11 @@
OffT offset;
} DataSym;
- // Is described by Dwarf debug info. Arbitrary string.
+ // Is described by Dwarf debug info. Arbitrary strings. Must
+ // be the same length.
struct {
- Char descr[128];
+ Char descr1[96];
+ Char descr2[96];
} Variable;
// Could only narrow it down to be the PLT/GOT/etc of a given
@@ -2868,8 +2870,12 @@
break;
case Addr_Variable:
- VG_(message)(Vg_UserMsg,
- "%s%s%s", xpre, ai->Addr.Variable.descr, xpost);
+ if (ai->Addr.Variable.descr1[0] != '\0')
+ VG_(message)(Vg_UserMsg, "%s%s%s",
+ xpre, ai->Addr.Variable.descr1, xpost);
+ if (ai->Addr.Variable.descr2[0] != '\0')
+ VG_(message)(Vg_UserMsg, "%s%s%s",
+ xpre, ai->Addr.Variable.descr2, xpost);
break;
case Addr_SectKind:
@@ -3416,15 +3422,22 @@
}
}
/* Perhaps the variable type/location data describes it? */
- VG_(memset)( &ai->Addr.Variable.descr,
- 0, sizeof(ai->Addr.Variable.descr));
+ tl_assert(sizeof(ai->Addr.Variable.descr1)
+ == sizeof(ai->Addr.Variable.descr2));
+ VG_(memset)( &ai->Addr.Variable.descr1,
+ 0, sizeof(ai->Addr.Variable.descr1));
+ VG_(memset)( &ai->Addr.Variable.descr2,
+ 0, sizeof(ai->Addr.Variable.descr2));
if (VG_(get_data_description)(
- a,
- &ai->Addr.Variable.descr[0],
- sizeof(ai->Addr.Variable.descr)-1 )) {
+ &ai->Addr.Variable.descr1[0],
+ &ai->Addr.Variable.descr2[0],
+ sizeof(ai->Addr.Variable.descr1)-1,
+ a )) {
ai->tag = Addr_Variable;
- tl_assert( ai->Addr.Variable.descr
- [ sizeof(ai->Addr.Variable.descr)-1 ] == 0);
+ tl_assert( ai->Addr.Variable.descr1
+ [ sizeof(ai->Addr.Variable.descr1)-1 ] == 0);
+ tl_assert( ai->Addr.Variable.descr2
+ [ sizeof(ai->Addr.Variable.descr2)-1 ] == 0);
return;
}
/* Have a look at the low level data symbols - perhaps it's in
|
|
From: Bart V. A. <bar...@gm...> - 2008-02-12 17:28:25
|
On Feb 12, 2008 4:27 AM, Tom Hughes <th...@cy...> wrote: > > exp-drd/tests/tc18_semabuse (stderr) Hello Tom, Can you please send me the diff files for this regression test ? Thanks, Bart Van Assche. |
|
From: Tom H. <th...@cy...> - 2008-02-12 17:21:38
|
In message <e2e...@ma...>
Bart Van Assche <bar...@gm...> wrote:
> On Feb 12, 2008 4:27 AM, Tom Hughes <th...@cy...> wrote:
>>
>> exp-drd/tests/tc18_semabuse (stderr)
>
> Can you please send me the diff files for this regression test ?
It's asserting - here's the output:
exp-drd: drd_semaphore.c:173 (semaphore_post_post): Assertion 'waited' failed.
==976== at 0x3800CBDC: report_and_quit (m_libcassert.c:140)
==976== by 0x3800CEEA: vgPlain_assert_fail (m_libcassert.c:200)
==976== by 0x38005A80: semaphore_post_post (drd_semaphore.c:173)
==976== by 0x38001D5A: drd_handle_client_request (drd_clientreq.c:200)
==976== by 0x38025D8C: do_client_request (scheduler.c:1388)
==976== by 0x380273D8: vgPlain_scheduler (scheduler.c:987)
==976== by 0x380378DE: run_a_thread_NORETURN (syswrap-linux.c:89)
sched status:
running_tid=1
Thread 1: status = VgTs_Runnable
==976== at 0x4A05B97: sem_post* (drd_intercepts.c:772)
==976== by 0x400840: main (tc18_semabuse.c:37)
Thread 2: status = VgTs_WaitSys
==976== at 0x36DC49AC61: (within /lib64/libc-2.7.so)
==976== by 0x36DC49AA83: sleep (sleep.c:138)
==976== by 0x400869: watchdog (tc18_semabuse.c:46)
==976== by 0x4A05EF8: vg_thread_wrapper (drd_intercepts.c:149)
==976== by 0x36DD006406: start_thread (pthread_create.c:297)
==976== by 0x36DC4D4B0C: clone (in /lib64/libc-2.7.so)
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: John R.
|
> Memcheck: mc_leakcheck.c:698 (vgMemCheck_do_detect_memory_leaks): > Assertion 'lc_shadows[i]->data + lc_shadows[i]->szB <= > lc_shadows[i+1]->data' failed. > at report_and_quit (m_libcassert.c:140) [snip] > by shutdown_actions_NORETURN (m_main.c:2025) > by run_a_thread_NORETURN (syswrap-linux.c:144) This is a classic "garbage collection" assertion. The error happened long ago and far away: one or more malloc/realloc/free was not seen, or there was some other error in the accounting for one or more blocks. To fix it you either need an oracle, or a way to check the assertion after every change in the accounting for blocks. It might be helpful to check the assertion at other times, too [such as: at every CALL and/or RETURN] just in case you do not realize all the places where the accounting could change. -- John Reiser, jreiser@BitWagon.com |
|
From: <sv...@va...> - 2008-02-12 13:54:44
|
Author: sewardj
Date: 2008-02-12 13:54:28 +0000 (Tue, 12 Feb 2008)
New Revision: 7402
Log:
* Describe offsets inside variables in terms of source level types,
where possible
* Record declaration coordinates of variables and use them in messages
Modified:
branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
branches/DATASYMS/coregrind/m_debuginfo/misc.c
branches/DATASYMS/coregrind/m_debuginfo/priv_misc.h
branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h
branches/DATASYMS/coregrind/m_debuginfo/priv_tytypes.h
branches/DATASYMS/coregrind/m_debuginfo/readdwarf.c
branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c
branches/DATASYMS/coregrind/m_debuginfo/readelf.c
branches/DATASYMS/coregrind/m_debuginfo/readstabs.c
branches/DATASYMS/coregrind/m_debuginfo/storage.c
branches/DATASYMS/coregrind/m_debuginfo/tytypes.c
branches/DATASYMS/memcheck/mc_main.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-12 13:54:28 UTC (rev 7402)
@@ -51,8 +51,8 @@
#include "pub_core_oset.h"
#include "pub_core_stacktrace.h" // VG_(get_StackTrace)
#include "priv_misc.h" /* dinfo_zalloc/free */
+#include "priv_tytypes.h"
#include "priv_storage.h"
-#include "priv_tytypes.h"
#include "priv_readdwarf.h"
#include "priv_readstabs.h"
#if defined(VGO_linux)
@@ -976,13 +976,13 @@
GXResult res;
Bool show = False;
vg_assert(var->name);
- vg_assert(var->typeV);
+ vg_assert(var->type);
vg_assert(var->gexprV);
- var_szB = ML_(sizeOfType)(var->typeV);
+ var_szB = ML_(sizeOfType)(var->type);
if (show) {
VG_(printf)("VVVV: find loc: %s :: ", var->name );
- ML_(pp_Type_C_ishly)( var->typeV );
+ ML_(pp_Type_C_ishly)( var->type );
VG_(printf)("\n");
}
@@ -1091,10 +1091,13 @@
DiVariable* var = (DiVariable*)VG_(indexXA)( vars, j );
SizeT offset;
if (data_address_is_in_var( &offset, var, ®s, data_addr )) {
+ XArray* xa = ML_(describe_type)( var->type, offset );
VG_(snprintf)(
dname, (SizeT)n_dname,
- "Address 0x%lx is %lu bytes inside local var \"%s\"",
- data_addr, offset, var->name);
+ "Address 0x%lx is %lu bytes inside local var "
+ "\"%s\" (%s) declared at %s:%d",
+ data_addr, offset, var->name, VG_(indexXA)(xa,0),
+ var->fileName ? var->fileName : "(unknown)", var->lineNo );
dname[n_dname-1] = 0;
return True;
}
Modified: branches/DATASYMS/coregrind/m_debuginfo/misc.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/misc.c 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/misc.c 2008-02-12 13:54:28 UTC (rev 7402)
@@ -54,6 +54,12 @@
UChar* ML_(dinfo_strdup) ( const UChar* str ) {
return VG_(arena_strdup)( VG_AR_DINFO, str );
}
+UChar* ML_(dinfo_memdup)( UChar* mem, UWord nbytes ) {
+ UChar* r = VG_(arena_malloc)( VG_AR_DINFO, nbytes );
+ if (nbytes > 0)
+ VG_(memcpy)( r, mem, nbytes );
+ return r;
+}
/*--------------------------------------------------------------------*/
/*--- end misc.c ---*/
Modified: branches/DATASYMS/coregrind/m_debuginfo/priv_misc.h
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/priv_misc.h 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/priv_misc.h 2008-02-12 13:54:28 UTC (rev 7402)
@@ -50,8 +50,8 @@
void* ML_(dinfo_zalloc)( SizeT szB );
void ML_(dinfo_free)( void* v );
UChar* ML_(dinfo_strdup)( const UChar* str );
+UChar* ML_(dinfo_memdup)( UChar* mem, UWord nbytes );
-
#endif /* ndef __PRIV_MISC_H */
/*--------------------------------------------------------------------*/
Modified: branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h 2008-02-12 13:54:28 UTC (rev 7402)
@@ -37,8 +37,8 @@
/* See comment at top of debuginfo.c for explanation of
the _svma / _avma / _image / _bias naming scheme.
*/
-/* Note this is not freestanding; needs pub_core_xarray.h to be
- included before it. */
+/* Note this is not freestanding; needs pub_core_xarray.h and
+ priv_tytypes.h to be included before it. */
#ifndef __PRIV_STORAGE_H
#define __PRIV_STORAGE_H
@@ -221,9 +221,11 @@
typedef
struct {
UChar* name; /* freestanding, in AR_DINFO */
- void* typeV; /* FIXME: make this D3Type* */
+ Type* type;
void* gexprV; /* FIXME: make this GExpr* */
void* fbGXv; /* FIXME: make this GExpr*. SHARED. */
+ UChar* fileName; /* where declared; may be NULL. */
+ Int lineNo; /* where declared; may be zero. */
}
DiVariable;
@@ -409,9 +411,11 @@
Addr aMin,
Addr aMax,
UChar* name,
- void* type, /* actually D3Type* */
+ Type* type,
void* gexpr, /* actually GExpr* */
void* fbGXv, /* actually GExpr*. SHARED. */
+ UChar* fileName, /* where decl'd - may be NULL */
+ Int lineNo, /* where decl'd - may be zero */
Bool show );
/* Canonicalise the tables held by 'di', in preparation for use. Call
Modified: branches/DATASYMS/coregrind/m_debuginfo/priv_tytypes.h
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/priv_tytypes.h 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/priv_tytypes.h 2008-02-12 13:54:28 UTC (rev 7402)
@@ -145,13 +145,16 @@
/* NOTE: this assumes that the types have all been 'resolved' (that
is, inter-type references expressed as .debug_info offsets have
been converted into pointers) */
-void ML_(pp_Type_C_ishly) ( void* /* Type* */ tyV );
+void ML_(pp_Type_C_ishly) ( Type* ty );
/* How big is this type? (post-resolved only) */
/* FIXME: check all pointers before dereferencing */
-SizeT ML_(sizeOfType)( void* /* Type */ tyV );
+SizeT ML_(sizeOfType)( Type* ty );
+/* Describe where in the type 'offset' falls. */
+XArray* /*UChar*/ ML_(describe_type)( Type* ty, OffT offset );
+
#endif /* ndef __PRIV_TYTYPES_H */
/*--------------------------------------------------------------------*/
Modified: branches/DATASYMS/coregrind/m_debuginfo/readdwarf.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readdwarf.c 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/readdwarf.c 2008-02-12 13:54:28 UTC (rev 7402)
@@ -40,6 +40,7 @@
#include "pub_core_options.h"
#include "pub_core_xarray.h"
#include "priv_misc.h" /* dinfo_zalloc/free/strdup */
+#include "priv_tytypes.h"
#include "priv_storage.h"
#include "priv_readdwarf.h" /* self */
Modified: branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/readdwarf3.c 2008-02-12 13:54:28 UTC (rev 7402)
@@ -56,8 +56,8 @@
#include "pub_core_options.h"
#include "pub_core_xarray.h"
#include "priv_misc.h" /* dinfo_zalloc/free/strdup */
+#include "priv_tytypes.h"
#include "priv_storage.h"
-#include "priv_tytypes.h"
#include "priv_d3basics.h"
#include "priv_readdwarf3.h" /* self */
@@ -222,12 +222,31 @@
return result;
}
+/* Assume 'c' points to the start of a string. Return the absolute
+ address of whatever it points at, and advance it past the
+ terminating zero. This makes it safe for the caller to then strdup
+ the returned value, since (w.r.t. image overruns) the process of
+ advancing past the terminating zero will already have "vetted" the
+ string. */
+static UChar* get_AsciiZ ( Cursor* c ) {
+ UChar uc;
+ UChar* res = get_address_of_Cursor(c);
+ do { uc = get_UChar(c); } while (uc != 0);
+ return res;
+}
+
static ULong peek_ULEB128 ( Cursor* c ) {
Word here = c->region_next;
ULong r = get_ULEB128( c );
c->region_next = here;
return r;
}
+static UChar peek_UChar ( Cursor* c ) {
+ Word here = c->region_next;
+ UChar r = get_UChar( c );
+ c->region_next = here;
+ return r;
+}
static ULong get_Dwarfish_UWord ( Cursor* c, Bool is_dw64 ) {
return is_dw64 ? get_ULong(c) : (ULong) get_UInt(c);
@@ -277,6 +296,9 @@
/* Where is .debug_loc ? */
UChar* debug_loc_img;
UWord debug_loc_sz;
+ /* Where is .debug_line? */
+ UChar* debug_line_img;
+ UWord debug_line_sz;
/* --- a cache for set_abbv_Cursor --- */
/* abbv_code == (ULong)-1 for an unused entry. */
struct { ULong abbv_code; UWord posn; } saC_cache[N_ABBV_CACHE];
@@ -456,7 +478,6 @@
* value is returned and the given pointer is
* moved past end of leb128 data */
/* FIXME: duplicated in readdwarf.c */
-#if 0
static ULong read_leb128U( UChar **data )
{
Int len;
@@ -464,7 +485,6 @@
*data += len;
return val;
}
-#endif
/* Same for signed data */
/* FIXME: duplicated in readdwarf.c */
@@ -494,9 +514,10 @@
}
-static
+//static
GXResult evaluate_Dwarf3_Expr ( UChar* expr, UWord exprszB,
- GExpr* fbGX, RegSummary* regs )
+ GExpr* fbGX, RegSummary* regs,
+ Bool push_initial_zero )
{
# define N_EXPR_STACK 20
@@ -533,12 +554,16 @@
GXResult fbval;
Addr a1;
Word sw1;
+ UWord uw1;
sp = -1;
vg_assert(expr);
vg_assert(exprszB >= 0);
limit = expr + exprszB;
+ if (push_initial_zero)
+ PUSH(0);
+
while (True) {
vg_assert(sp >= -1 && sp < N_EXPR_STACK);
@@ -584,6 +609,11 @@
a1 += sw1;
PUSH( a1 );
break;
+ case DW_OP_plus_uconst:
+ POP(uw1);
+ uw1 += (UWord)read_leb128U( &expr );
+ PUSH(uw1);
+ break;
default:
if (!VG_(clo_xml))
VG_(message)(Vg_DebugMsg,
@@ -645,7 +675,8 @@
vg_assert(aMax == ~(Addr)0);
/* Assert this is the first guard. */
vg_assert(nGuards == 1);
- res = evaluate_Dwarf3_Expr( p, (UWord)nbytes, fbGX, regs );
+ res = evaluate_Dwarf3_Expr( p, (UWord)nbytes, fbGX, regs,
+ False/*push_initial_zero*/ );
/* Now check there are no more guards. */
p += (UWord)nbytes;
vg_assert(*p == 1); /*isEnd*/
@@ -653,7 +684,8 @@
} else {
if (aMin <= regs->ip && regs->ip <= aMax) {
/* found a matching range. Evaluate the expression. */
- return evaluate_Dwarf3_Expr( p, (UWord)nbytes, fbGX, regs );
+ return evaluate_Dwarf3_Expr( p, (UWord)nbytes, fbGX, regs,
+ False/*push_initial_zero*/ );
}
}
/* else keep searching */
@@ -1102,12 +1134,10 @@
break;
}
case DW_FORM_string: {
- UInt u32;
- UChar* str = get_address_of_Cursor(c);
- do { u32 = get_UChar(c); } while (u32 != 0);
+ UChar* str = get_AsciiZ(c);
TRACE_D3("%s", str);
*cts = (ULong)(UWord)str;
- /* strlen is safe because get_UChar already 'vetted' the
+ /* strlen is safe because get_AsciiZ already 'vetted' the
entire string */
*ctsMemSzB = 1 + (ULong)VG_(strlen)(str);
break;
@@ -1162,7 +1192,9 @@
Type* typeR;
GExpr* gexpr; /* for this variable */
GExpr* fbGX; /* to find the frame base of the enclosing fn, if
- any */
+ any */
+ UChar* fName; /* declaring file name, or NULL */
+ Int fLine; /* declaring file line number, or zero */
}
TempVar;
@@ -1192,6 +1224,9 @@
Bool isFunc[N_D3_VAR_STACK]; /* from DW_AT_subprogram? */
GExpr* fbGX[N_D3_VAR_STACK]; /* if isFunc, contains the FB
expr, else NULL */
+ /* The file name table. Is a mapping from integer index to the
+ (permanent) copy of the string, iow a non-img area. */
+ XArray* /* of UChar* */ filenameTable;
}
D3VarParser;
@@ -1309,6 +1344,66 @@
return gexpr;
}
+
+static
+void read_filename_table( /*MOD*/D3VarParser* parser,
+ CUConst* cc, UWord debug_line_offset,
+ Bool td3 )
+{
+ Cursor c;
+ vg_assert(parser && cc && cc->barf);
+ if ((!cc->debug_line_img)
+ || cc->debug_line_sz <= debug_line_offset)
+ cc->barf("read_filename_table: .debug_line is missing?");
+
+ init_Cursor( &c, cc->debug_line_img,
+ cc->debug_line_sz, debug_line_offset, cc->barf,
+ "Overrun whilst reading .debug_line section(1)" );
+
+ Bool is_dw64;
+ ULong unit_length = get_Initial_Length( &is_dw64, &c, "read_filename_table: invalid initial-length field" );
+ UShort version = get_UShort( &c );
+ if (version != 2)
+ cc->barf("read_filename_table: Only DWARF version 2 line info "
+ "is currently supported.");
+ ULong header_length = (ULong)get_Dwarfish_UWord( &c, is_dw64 );
+ UChar minimum_instruction_length = get_UChar( &c );
+ UChar default_is_stmt = get_UChar( &c );
+ Char line_base = (Char)get_UChar( &c );
+ UChar line_range = get_UChar( &c );
+ UChar opcode_base = get_UChar( &c );
+ /* skip over "standard_opcode_lengths" */
+ Word i;
+ for (i = 1; i < (Word)opcode_base; i++)
+ (void)get_UChar( &c );
+
+ /* skip over the directory names table */
+ while (peek_UChar(&c) != 0) {
+ (void)get_AsciiZ(&c);
+ }
+ (void)get_UChar(&c); /* skip terminating zero */
+
+ /* Read and record the file names table */
+ vg_assert(parser->filenameTable);
+ vg_assert( VG_(sizeXA)( parser->filenameTable ) == 0 );
+ /* Add a dummy index-zero entry. DWARF3 numbers its files
+ from 1, for some reason. */
+ UChar* str = ML_(dinfo_strdup)( "<unknown>" );;
+ VG_(addToXA)( parser->filenameTable, &str );
+ while (peek_UChar(&c) != 0) {
+ str = get_AsciiZ(&c);
+ TRACE_D3(" read_filename_table: %ld %s\n",
+ VG_(sizeXA)(parser->filenameTable), str);
+ str = ML_(dinfo_strdup)( str );
+ VG_(addToXA)( parser->filenameTable, &str );
+ (void)get_ULEB128( &c ); /* skip directory index # */
+ (void)get_ULEB128( &c ); /* skip last mod time */
+ (void)get_ULEB128( &c ); /* file size */
+ }
+ /* We're done! The rest of it is not interesting. */
+}
+
+
__attribute__((noinline))
static void parse_var_DIE ( /*OUT*/TempVar** tempvars,
/*OUT*/GExpr** gexprs,
@@ -1355,6 +1450,9 @@
rangeoff = cts;
have_range = True;
}
+ if (attr == DW_AT_stmt_list && ctsSzB > 0) {
+ read_filename_table( parser, cc, (UWord)cts, td3 );
+ }
}
/* Now, does this give us an opportunity to find this
CU's svma? */
@@ -1494,6 +1592,8 @@
Int n_attrs = 0;
Bool has_abs_ori = False;
Bool declaration = False;
+ Int lineNo = 0;
+ UChar* fileName = NULL;
while (True) {
DW_AT attr = (DW_AT) get_ULEB128( c_abbv );
DW_FORM form = (DW_FORM)get_ULEB128( c_abbv );
@@ -1525,6 +1625,19 @@
if (attr == DW_AT_declaration && ctsSzB > 0 && cts > 0) {
declaration = True;
}
+ if (attr == DW_AT_decl_line && ctsSzB > 0) {
+ lineNo = (Int)cts;
+ }
+ if (attr == DW_AT_decl_file && ctsSzB > 0) {
+ Int ftabIx = (Int)cts;
+ if (ftabIx >= 1
+ && ftabIx < VG_(sizeXA)( parser->filenameTable )) {
+ fileName = *(UChar**)
+ VG_(indexXA)( parser->filenameTable, ftabIx );
+ vg_assert(fileName);
+ }
+ if (0) VG_(printf)("XXX filename = %s\n", fileName);
+ }
}
/* We'll collect it if it has a type and a location. Doesn't
even have to have a name. */
@@ -1589,6 +1702,8 @@
tv->typeR = typeR;
tv->gexpr = gexpr;
tv->fbGX = fbGX;
+ tv->fName = fileName;
+ tv->fLine = lineNo;
tv->next = *tempvars;
*tempvars = tv;
}
@@ -2107,7 +2222,9 @@
field->typeR = (Type*)(UWord)cts;
}
if (attr == DW_AT_data_member_location && ctsMemSzB > 0) {
- expr = ML_(new_D3Expr)( (UChar*)(UWord)cts, (UWord)ctsMemSzB );
+ UChar* copy = ML_(dinfo_memdup)( (UChar*)(UWord)cts,
+ (UWord)ctsMemSzB );
+ expr = ML_(new_D3Expr)( copy, (UWord)ctsMemSzB );
}
}
/* Do we have a plausible parent? */
@@ -2727,6 +2844,10 @@
Bool td3 = di->trace_symtab;
#if 0
+ /* This doesn't work properly because it assumes all entries are
+ packed end to end, with no holes. But that doesn't always
+ appear to be the case, so it loses sync. And the D3 spec
+ doesn't appear to require a no-hole situation either. */
/* Display .debug_loc */
Addr dl_base;
UWord dl_offset;
@@ -2915,6 +3036,8 @@
cu_start_offset = get_position_of_Cursor( &info );
TRACE_D3("\n");
TRACE_D3(" Compilation Unit @ offset 0x%lx:\n", cu_start_offset);
+ /* parse_CU_header initialises the CU's set_abbv_Cursor cache
+ (saC_cache) */
parse_CU_Header( &cc, td3, &info,
(UChar*)debug_abbv_img, debug_abbv_sz );
cc.debug_str_img = debug_str_img;
@@ -2923,6 +3046,8 @@
cc.debug_ranges_sz = debug_ranges_sz;
cc.debug_loc_img = debug_loc_img;
cc.debug_loc_sz = debug_loc_sz;
+ cc.debug_line_img = debug_line_img;
+ cc.debug_line_sz = debug_line_sz;
cc.cu_start_offset = cu_start_offset;
/* The CU's svma can be deduced by looking at the AT_low_pc
value in the top level TAG_compile_unit, which is the topmost
@@ -2939,6 +3064,18 @@
unitary_range_list(0UL, ~0UL),
-1, False/*isFunc*/, NULL/*fbGX*/ );
+ /* And set up the file name table. When we come across the top
+ level DIE for this CU (which is what the next call to
+ read_DIE should process) we will copy all the file names out
+ of the .debug_line img area and use this table to look up the
+ copies when we later see filename numbers in DW_TAG_variables
+ etc. */
+ vg_assert(!varparser.filenameTable );
+ varparser.filenameTable
+ = VG_(newXA)( ML_(dinfo_zalloc), ML_(dinfo_free),
+ sizeof(UChar*) );
+ vg_assert(varparser.filenameTable );
+
/* Now read the one-and-only top-level DIE for this CU. */
vg_assert(varparser.sp == 0);
read_DIE( &admin, &tempvars, &gexprs, &typarser, &varparser,
@@ -2964,6 +3101,10 @@
TRACE_D3("set_abbv_Cursor cache: %lu queries, %lu misses\n",
cc.saC_cache_queries, cc.saC_cache_misses);
+
+ vg_assert(varparser.filenameTable );
+ VG_(deleteXA)( varparser.filenameTable );
+ varparser.filenameTable = NULL;
}
/* Put the type entry list the right way round. Not strictly
@@ -3030,6 +3171,9 @@
} else {
VG_(printf)(" FrB=none\n");
}
+ VG_(printf)(" declared at: %s:%d\n",
+ varp->fName ? varp->fName : (UChar*)"(null)",
+ varp->fLine );
VG_(printf)("\n");
}
@@ -3056,7 +3200,8 @@
varp->pcMin + (varp->level==0 ? 0 : di->text_bias),
varp->pcMax + (varp->level==0 ? 0 : di->text_bias),
varp->name, (void*)varp->typeR,
- varp->gexpr, varp->fbGX, td3
+ varp->gexpr, varp->fbGX,
+ varp->fName, varp->fLine, td3
);
ML_(dinfo_free)(varp);
}
Modified: branches/DATASYMS/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-02-12 13:54:28 UTC (rev 7402)
@@ -47,6 +47,7 @@
#include "pub_core_tooliface.h" /* VG_(needs) */
#include "pub_core_xarray.h"
#include "priv_misc.h" /* dinfo_zalloc/free/strdup */
+#include "priv_tytypes.h"
#include "priv_storage.h"
#include "priv_readelf.h" /* self */
#include "priv_readdwarf.h" /* 'cos ELF contains DWARF */
Modified: branches/DATASYMS/coregrind/m_debuginfo/readstabs.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readstabs.c 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/readstabs.c 2008-02-12 13:54:28 UTC (rev 7402)
@@ -40,6 +40,7 @@
#include "pub_core_libcprint.h"
#include "pub_core_xarray.h"
#include "priv_misc.h" /* dinfo_zalloc/free/strdup */
+#include "priv_tytypes.h"
#include "priv_storage.h"
#include "priv_readstabs.h" /* self */
Modified: branches/DATASYMS/coregrind/m_debuginfo/storage.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/storage.c 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/storage.c 2008-02-12 13:54:28 UTC (rev 7402)
@@ -45,13 +45,13 @@
#include "pub_core_xarray.h"
#include "pub_core_oset.h"
+#include "priv_tytypes.h"
#include "priv_storage.h" /* self */
//FIXME: get rid of this
#include "priv_readdwarf3.h" // ML_(pp_GX)
#include "priv_misc.h" /* dinfo_zalloc/free/strdup */
-#include "priv_tytypes.h"
/*------------------------------------------------------------*/
@@ -573,9 +573,11 @@
Addr aMin,
Addr aMax,
UChar* name,
- void* typeV, /* actually D3Type* */
+ Type* type,
void* gexprV, /* actually GExpr* */
void* fbGXv, /* actually GExpr*. SHARED. */
+ UChar* fileName, /* where decl'd - may be NULL */
+ Int lineNo, /* where decl'd - may be zero */
Bool show )
{
OSet* /* of DiAddrRange */ inner;
@@ -585,7 +587,7 @@
if (0) {
VG_(printf)(" ML_(addVar): level %d %p-%p %s :: ",
level, aMin, aMax, name );
- ML_(pp_Type_C_ishly)( typeV );
+ ML_(pp_Type_C_ishly)( type );
VG_(printf)("\n Var=");
ML_(pp_GX)(gexprV);
VG_(printf)("\n");
@@ -602,7 +604,7 @@
vg_assert(level >= 0);
vg_assert(aMin <= aMax);
vg_assert(name);
- vg_assert(typeV);
+ vg_assert(type);
vg_assert(gexprV);
if (!di->varinfo) {
@@ -629,10 +631,12 @@
or create one if not present. */
/* DiAddrRange* */ range = find_or_create_arange( inner, aMin, aMax );
/* DiVariable var; */
- var.name = name;
- var.typeV = typeV;
- var.gexprV = gexprV;
- var.fbGXv = fbGXv;
+ var.name = name;
+ var.type = type;
+ var.gexprV = gexprV;
+ var.fbGXv = fbGXv;
+ var.fileName = fileName;
+ var.lineNo = lineNo;
vg_assert(range);
vg_assert(range->vars);
vg_assert(range->aMin == aMin);
Modified: branches/DATASYMS/coregrind/m_debuginfo/tytypes.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/tytypes.c 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/coregrind/m_debuginfo/tytypes.c 2008-02-12 13:54:28 UTC (rev 7402)
@@ -35,11 +35,18 @@
#include "pub_core_basics.h"
#include "pub_core_libcassert.h"
+#include "pub_core_libcbase.h"
#include "pub_core_libcprint.h"
#include "pub_core_xarray.h" /* to keep priv_tytypes.h happy */
#include "priv_misc.h" /* dinfo_zalloc/free/strdup */
#include "priv_tytypes.h" /* self */
+///////////////// HACK - get rid of this
+#include "priv_readdwarf3.h" // GXResult
+GXResult evaluate_Dwarf3_Expr ( UChar* expr, UWord exprszB,
+ GExpr* fbGX, RegSummary* regs,
+ Bool push_initial_zero );
+/////////////////
TyAdmin* ML_(new_TyAdmin) ( UWord cuOff, TyAdmin* next ) {
TyAdmin* admin = ML_(dinfo_zalloc)( sizeof(TyAdmin) );
@@ -212,10 +219,8 @@
/* NOTE: this assumes that the types have all been 'resolved' (that
is, inter-type references expressed as .debug_info offsets have
been converted into pointers) */
-void ML_(pp_Type_C_ishly) ( void* /* Type* */ tyV )
+void ML_(pp_Type_C_ishly) ( Type* ty )
{
- Type* ty = (Type*)tyV;
-
switch (ty->tag) {
case Ty_Base:
if (!ty->Ty.Base.name) goto unhandled;
@@ -278,11 +283,10 @@
/* How big is this type? (post-resolved only) */
/* FIXME: check all pointers before dereferencing */
-SizeT ML_(sizeOfType)( void* /* Type */ tyV )
+SizeT ML_(sizeOfType)( Type* ty )
{
- SizeT eszB;
- Word i;
- Type* ty = (Type*)tyV;
+ SizeT eszB;
+ Word i;
switch (ty->tag) {
case Ty_Base:
return ty->Ty.Base.szB;
@@ -314,12 +318,143 @@
return eszB;
default:
VG_(printf)("ML_(sizeOfType): unhandled: ");
- ML_(pp_Type)(tyV);
+ ML_(pp_Type)(ty);
VG_(printf)("\n");
vg_assert(0);
}
}
+
+static void copy_bytes_into_XA ( XArray* /* of UChar */ xa,
+ void* bytes, Word nbytes ) {
+ Word i;
+ for (i = 0; i < nbytes; i++)
+ VG_(addToXA)( xa, & ((UChar*)bytes)[i] );
+}
+static void copy_UWord_into_XA ( XArray* /* of UChar */ xa,
+ UWord uw ) {
+ UChar buf[32];
+ VG_(memset)(buf, 0, sizeof(buf));
+ VG_(sprintf)(buf, "%lu", uw);
+ copy_bytes_into_XA( xa, buf, VG_(strlen)(buf));
+}
+
+
+XArray* /*UChar*/ ML_(describe_type)( Type* ty, OffT offset )
+{
+ XArray* xa = VG_(newXA)( ML_(dinfo_zalloc), ML_(dinfo_free),
+ sizeof(UChar) );
+ vg_assert(xa);
+
+ while (True) {
+ vg_assert(ty);
+
+ switch (ty->tag) {
+
+ case Ty_Base:
+ goto done;
+
+ case Ty_StOrUn: {
+ Word i;
+ GXResult res;
+ TyField *field = NULL, *fields;
+ SizeT offMin = 0, offMax1 = 0;
+ if (!ty->Ty.StOrUn.isStruct) goto done;
+ fields = ty->Ty.StOrUn.fields;
+ if ((!fields) || VG_(sizeXA)(fields) == 0) goto done;
+ for (i = 0; i < VG_(sizeXA)( fields ); i++ ) {
+ field = *(TyField**)VG_(indexXA)( fields, i );
+ vg_assert(field);
+ vg_assert(field->loc);
+ res = evaluate_Dwarf3_Expr(
+ field->loc->bytes, field->loc->nbytes,
+ NULL/*fbGX*/, NULL/*RegSummary*/,
+ True/*push_initial_zero*/ );
+ if (0) VG_(printf)("QQQ %lu %s\n", res.res,res.failure);
+ if (res.failure)
+ continue;
+ offMin = res.res;
+ offMax1 = offMin + ML_(sizeOfType)( field->typeR );
+ if (offMin == offMax1)
+ continue;
+ vg_assert(offMin < offMax1);
+ if (offset >= offMin && offset < offMax1)
+ break;
+ }
+ /* Did we find a suitable field? */
+ vg_assert(i >= 0 && i <= VG_(sizeXA)( fields ));
+ if (i == VG_(sizeXA)( fields ))
+ goto done; /* No. Give up. */
+ /* Yes. 'field' is it. */
+ if (!field->name) goto done;
+ copy_bytes_into_XA( xa, ".", 1 );
+ copy_bytes_into_XA( xa, field->name,
+ VG_(strlen)(field->name) );
+ offset -= offMin;
+ ty = field->typeR;
+ if (!ty) goto done;
+ /* keep going; look inside the field. */
+ break;
+ }
+
+ case Ty_Array: {
+ TyBounds* bounds;
+ UWord size, eszB, ix;
+ /* Just deal with the simple, common C-case: 1-D array,
+ zero based, known size. */
+ if (!(ty->Ty.Array.typeR && ty->Ty.Array.bounds))
+ goto done;
+ if (VG_(sizeXA)( ty->Ty.Array.bounds ) != 1) goto done;
+ bounds = *(TyBounds**)VG_(indexXA)( ty->Ty.Array.bounds, 0 );
+ vg_assert(bounds);
+ vg_assert(bounds->magic == TyBounds_MAGIC);
+ if (!(bounds->knownL && bounds->knownU && bounds->boundL == 0
+ && bounds->boundU >= bounds->boundL))
+ goto done;
+ size = bounds->boundU - bounds->boundL + 1;
+ vg_assert(size >= 1);
+ eszB = ML_(sizeOfType)( ty->Ty.Array.typeR );
+ if (eszB == 0) goto done;
+ ix = offset / eszB;
+ copy_bytes_into_XA( xa, "[", 1 );
+ copy_UWord_into_XA( xa, ix );
+ copy_bytes_into_XA( xa, "]", 1 );
+ ty = ty->Ty.Array.typeR;
+ offset -= ix * eszB;
+ /* keep going; look inside the array element. */
+ break;
+ }
+
+ case Ty_Qual: {
+ if (!ty->Ty.Qual.typeR) goto done;
+ ty = ty->Ty.Qual.typeR;
+ break;
+ }
+
+ case Ty_TyDef: {
+ if (!ty->Ty.TyDef.typeR) goto done;
+ ty = ty->Ty.TyDef.typeR;
+ break;
+ }
+
+ default: {
+ VG_(printf)("ML_(describe_type): unhandled: ");
+ ML_(pp_Type)(ty);
+ VG_(printf)("\n");
+ vg_assert(0);
+ }
+ }
+ }
+
+ done:
+ if (offset > 0) {
+ copy_bytes_into_XA( xa, " +", 2 );
+ copy_UWord_into_XA( xa, offset );
+ }
+ copy_bytes_into_XA( xa, "\0", 1 );
+ return xa;
+}
+
/*--------------------------------------------------------------------*/
/*--- end tytypes.c ---*/
/*--------------------------------------------------------------------*/
Modified: branches/DATASYMS/memcheck/mc_main.c
===================================================================
--- branches/DATASYMS/memcheck/mc_main.c 2008-02-11 21:22:15 UTC (rev 7401)
+++ branches/DATASYMS/memcheck/mc_main.c 2008-02-12 13:54:28 UTC (rev 7402)
@@ -2664,19 +2664,19 @@
// In a global .data symbol. This holds the first 63 chars of
// the variable's (zero terminated), plus an offset.
struct {
- Char name[64];
+ Char name[128];
OffT offset;
} DataSym;
// Is described by Dwarf debug info. Arbitrary string.
struct {
- Char descr[64];
+ Char descr[128];
} Variable;
// Could only narrow it down to be the PLT/GOT/etc of a given
// object. Better than nothing, perhaps.
struct {
- Char objname[64];
+ Char objname[128];
VgSectKind kind;
} SectKind;
|
|
From: Tom H. <to...@co...> - 2008-02-12 10:31:07
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> * Would it perhaps be prudent to deregister the stack at thread
> exit? Otherwise, the linked list of stacks grows without bound
> (afaics -- VG_(deregister_stack) is only ever called as a result
> of a client request at the moment). Which clearly isn't too good
> for eg none/tests/manythreads.c.
Probably a good idea, yes. It will probably mean storing the ID value
returned by register_stack in the thread state.
> * In VG_(get_StackTrace), the call to VG_(stack_limits)
> potentially gets a new value for stack_highest_word, and
> that could (?) be higher than the previous value,
> VG_(threads)[tid].client_stack_highest_word (I don't see how,
> but still ..) Maybe more conservative to use the min of
> the values from VG_(threads)[tid].client_stack_highest_word
> and VG_(stack_limits)?
Well really we should probably change client_stack_highest_word when
a stack change happens surely? That was actually my first plan, but
it turned out to be quite hard as VG_(unknown_SP_update) is the place
that detects the change but it is called from generated code without
any easy access to the thread state, and is probably fairly sensitive
to performance issues.
I did consider updating it each time control returned from the client
to valgrind, but that proved non-trivial as well as m_stacks.c is
tracking the concept of the current stack via a global variable.
> * This might give a bit of a performance hit in unwind-
> intensive programs as the stacks list now has to be searched for
> each snapshot. I guess we could mostly ameliorate this by the
> usual trick of incrementally rearranging the list to diffuse
> frequently-requested entries towards the front.
It may be an issue, yes. In fact my original solution to the
problem of stopping the unwinder crashing was to simply ask the
address space manager whether the stack frame we were about to
try and read existed and was readable. That should be completely
bulletproof, but I was worried about the cost as that was done
for every stack entry not just once per unwind.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Julian S. <js...@ac...> - 2008-02-12 10:13:31
|
> Worth filing a bug for? I'd say yes, considering it's happening in an unpatched valgrind. J |
|
From: Dan K. <da...@ke...> - 2008-02-12 06:55:25
|
In December, I was seeing this assertion failure, but the stack traceback was poor (probably because I had a patched valgrind); see http://www.kegel.com/wine/valgrind/logs-2007-12-14/vg-winmm_wave-diff.txt With today's Valgrind from svn, unpatched, the assertion still's happening, but the stack traceback is much better. Here's the text: Memcheck: mc_leakcheck.c:698 (vgMemCheck_do_detect_memory_leaks): Assertion 'lc_shadows[i]->data + lc_shadows[i]->szB <= lc_shadows[i+1]->data' failed. at report_and_quit (m_libcassert.c:140) by vgPlain_assert_fail (m_libcassert.c:200) by vgMemCheck_do_detect_memory_leaks (mc_leakcheck.c:697) by mc_detect_memory_leaks (mc_main.c:4214) by mc_fini (mc_main.c:4904) by shutdown_actions_NORETURN (m_main.c:2025) by run_a_thread_NORETURN (syswrap-linux.c:144) sched status: running_tid=1 This is on Ubuntu Feisty, running the wine conformance test suite. Worth filing a bug for? - Dan |
|
From: Tom H. <th...@cy...> - 2008-02-12 05:02:42
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2008-02-12 03:15:05 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 338 tests, 84 stderr failures, 3 stdout failures, 29 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/lsframe1 (stderr) memcheck/tests/lsframe2 (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/noisy_child (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/x86/bug152022 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) massif/tests/alloc-fns-A (post) massif/tests/alloc-fns-B (post) massif/tests/basic (post) massif/tests/basic2 (post) massif/tests/big-alloc (post) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/custom_alloc (post) massif/tests/deep-A (post) massif/tests/deep-B (stderr) massif/tests/deep-B (post) massif/tests/deep-C (stderr) massif/tests/deep-C (post) massif/tests/deep-D (post) massif/tests/ignoring (post) massif/tests/insig (post) massif/tests/long-names (post) massif/tests/long-time (post) massif/tests/new-cpp (post) massif/tests/null (post) massif/tests/one (post) massif/tests/overloaded-new (post) massif/tests/peak (post) massif/tests/peak2 (stderr) massif/tests/peak2 (post) massif/tests/realloc (stderr) massif/tests/realloc (post) massif/tests/thresholds_0_0 (post) massif/tests/thresholds_0_10 (post) massif/tests/thresholds_10_0 (post) massif/tests/thresholds_10_10 (post) massif/tests/thresholds_5_0 (post) massif/tests/thresholds_5_10 (post) massif/tests/zero1 (post) massif/tests/zero2 (post) none/tests/blockfault (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/hg06_readshared (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc02_simple_tls (stderr) helgrind/tests/tc03_re_excl (stderr) helgrind/tests/tc04_free_lock (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc10_rec_lock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc13_laog1 (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) helgrind/tests/tc24_nonzero_sem (stderr) exp-drd/tests/fp_race (stderr) exp-drd/tests/fp_race2 (stderr) exp-drd/tests/matinv (stderr) exp-drd/tests/pth_barrier (stderr) exp-drd/tests/pth_broadcast (stderr) exp-drd/tests/pth_cond_race (stderr) exp-drd/tests/pth_cond_race2 (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/sem_as_mutex (stderr) exp-drd/tests/sem_as_mutex2 (stderr) exp-drd/tests/sigalrm (stderr) exp-drd/tests/tc17_sembar (stderr) exp-drd/tests/tc18_semabuse (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 338 tests, 84 stderr failures, 1 stdout failure, 29 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/lsframe1 (stderr) memcheck/tests/lsframe2 (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/noisy_child (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/x86/bug152022 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) massif/tests/alloc-fns-A (post) massif/tests/alloc-fns-B (post) massif/tests/basic (post) massif/tests/basic2 (post) massif/tests/big-alloc (post) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/custom_alloc (post) massif/tests/deep-A (post) massif/tests/deep-B (stderr) massif/tests/deep-B (post) massif/tests/deep-C (stderr) massif/tests/deep-C (post) massif/tests/deep-D (post) massif/tests/ignoring (post) massif/tests/insig (post) massif/tests/long-names (post) massif/tests/long-time (post) massif/tests/new-cpp (post) massif/tests/null (post) massif/tests/one (post) massif/tests/overloaded-new (post) massif/tests/peak (post) massif/tests/peak2 (stderr) massif/tests/peak2 (post) massif/tests/realloc (stderr) massif/tests/realloc (post) massif/tests/thresholds_0_0 (post) massif/tests/thresholds_0_10 (post) massif/tests/thresholds_10_0 (post) massif/tests/thresholds_10_10 (post) massif/tests/thresholds_5_0 (post) massif/tests/thresholds_5_10 (post) massif/tests/zero1 (post) massif/tests/zero2 (post) none/tests/blockfault (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/hg06_readshared (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc02_simple_tls (stderr) helgrind/tests/tc03_re_excl (stderr) helgrind/tests/tc04_free_lock (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc10_rec_lock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc13_laog1 (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) helgrind/tests/tc24_nonzero_sem (stderr) exp-drd/tests/fp_race (stderr) exp-drd/tests/fp_race2 (stderr) exp-drd/tests/matinv (stderr) exp-drd/tests/pth_barrier (stderr) exp-drd/tests/pth_broadcast (stderr) exp-drd/tests/pth_cond_race (stderr) exp-drd/tests/pth_cond_race2 (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/sem_as_mutex (stderr) exp-drd/tests/sem_as_mutex2 (stderr) exp-drd/tests/sigalrm (stderr) exp-drd/tests/tc17_sembar (stderr) exp-drd/tests/tc18_semabuse (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 12 04:14:41 2008 --- new.short Tue Feb 12 05:02:44 2008 *************** *** 8,10 **** ! == 338 tests, 84 stderr failures, 1 stdout failure, 29 post failures == memcheck/tests/addressable (stderr) --- 8,10 ---- ! == 338 tests, 84 stderr failures, 3 stdout failures, 29 post failures == memcheck/tests/addressable (stderr) *************** *** 77,78 **** --- 77,80 ---- none/tests/blockfault (stderr) + none/tests/cmdline1 (stdout) + none/tests/cmdline2 (stdout) none/tests/mremap (stderr) |
|
From: Tom H. <th...@cy...> - 2008-02-12 04:03:40
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2008-02-12 03:05:05 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 372 tests, 7 stderr failures, 4 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 372 tests, 7 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 12 03:32:20 2008 --- new.short Tue Feb 12 04:02:35 2008 *************** *** 8,10 **** ! == 372 tests, 7 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) --- 8,10 ---- ! == 372 tests, 7 stderr failures, 4 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) *************** *** 14,15 **** --- 14,17 ---- memcheck/tests/xml1 (stderr) + none/tests/cmdline1 (stdout) + none/tests/cmdline2 (stdout) none/tests/mremap (stderr) |
|
From: Tom H. <th...@cy...> - 2008-02-12 03:46:31
|
Nightly build on aston ( x86_64, Fedora Core 5 ) started at 2008-02-12 03:20:04 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 378 tests, 13 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/blockfault (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 378 tests, 14 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/blockfault (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc08_hbl2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) exp-drd/tests/sem_as_mutex2 (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 12 03:33:45 2008 --- new.short Tue Feb 12 03:46:34 2008 *************** *** 8,10 **** ! == 378 tests, 14 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/addressable (stderr) --- 8,10 ---- ! == 378 tests, 13 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/addressable (stderr) *************** *** 19,26 **** none/tests/blockfault (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) - helgrind/tests/tc08_hbl2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) - exp-drd/tests/sem_as_mutex2 (stderr) --- 19,26 ---- none/tests/blockfault (stderr) + none/tests/cmdline1 (stdout) + none/tests/cmdline2 (stdout) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) |
|
From: Tom H. <th...@cy...> - 2008-02-12 03:38:05
|
Nightly build on trojan ( x86_64, Fedora Core 6 ) started at 2008-02-12 03:25:05 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 376 tests, 6 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/bug133694 (stdout) memcheck/tests/x86/bug133694 (stderr) memcheck/tests/x86/scalar (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 376 tests, 7 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/bug133694 (stdout) memcheck/tests/x86/bug133694 (stderr) memcheck/tests/x86/scalar (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) exp-drd/tests/sem_as_mutex2 (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 12 03:31:39 2008 --- new.short Tue Feb 12 03:38:07 2008 *************** *** 8,10 **** ! == 376 tests, 7 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 376 tests, 6 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) *************** *** 20,22 **** helgrind/tests/tc22_exit_w_lock (stderr) - exp-drd/tests/sem_as_mutex2 (stderr) --- 20,21 ---- |
|
From: Tom H. <th...@cy...> - 2008-02-12 03:27:25
|
Nightly build on dellow ( x86_64, Fedora 8 ) started at 2008-02-12 03:10:05 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 372 tests, 9 stderr failures, 4 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) exp-drd/tests/tc18_semabuse (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 372 tests, 8 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 12 03:18:49 2008 --- new.short Tue Feb 12 03:27:26 2008 *************** *** 8,10 **** ! == 372 tests, 8 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) --- 8,10 ---- ! == 372 tests, 9 stderr failures, 4 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) *************** *** 14,15 **** --- 14,17 ---- memcheck/tests/xml1 (stderr) + none/tests/cmdline1 (stdout) + none/tests/cmdline2 (stdout) none/tests/mremap (stderr) *************** *** 19,20 **** --- 21,23 ---- helgrind/tests/tc22_exit_w_lock (stderr) + exp-drd/tests/tc18_semabuse (stderr) |
|
From: Tom H. <th...@cy...> - 2008-02-12 03:18:38
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2008-02-12 03:00:03 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 378 tests, 34 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/amd64/insn_ssse3 (stdout) none/tests/amd64/insn_ssse3 (stderr) none/tests/amd64/ssse3_misaligned (stderr) none/tests/blockfault (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/x86/insn_ssse3 (stdout) none/tests/x86/insn_ssse3 (stderr) none/tests/x86/ssse3_misaligned (stderr) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 378 tests, 34 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/amd64/insn_ssse3 (stdout) none/tests/amd64/insn_ssse3 (stderr) none/tests/amd64/ssse3_misaligned (stderr) none/tests/blockfault (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/x86/insn_ssse3 (stdout) none/tests/x86/insn_ssse3 (stderr) none/tests/x86/ssse3_misaligned (stderr) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Feb 12 03:11:32 2008 --- new.short Tue Feb 12 03:18:39 2008 *************** *** 8,10 **** ! == 378 tests, 34 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/addressable (stderr) --- 8,10 ---- ! == 378 tests, 34 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/addressable (stderr) *************** *** 23,24 **** --- 23,26 ---- none/tests/blockfault (stderr) + none/tests/cmdline1 (stdout) + none/tests/cmdline2 (stdout) none/tests/fdleak_fcntl (stderr) |