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
(20) |
2
(20) |
3
(11) |
4
(10) |
5
(11) |
6
(19) |
|
7
(12) |
8
(22) |
9
(22) |
10
(18) |
11
(11) |
12
(21) |
13
(17) |
|
14
(8) |
15
(16) |
16
(16) |
17
(9) |
18
(19) |
19
(12) |
20
(9) |
|
21
(8) |
22
(12) |
23
(17) |
24
(8) |
25
(8) |
26
(7) |
27
(11) |
|
28
(12) |
29
(16) |
30
(16) |
31
(9) |
|
|
|
|
From: <sv...@va...> - 2007-01-12 23:59:55
|
Author: njn
Date: 2007-01-12 23:59:50 +0000 (Fri, 12 Jan 2007)
New Revision: 6514
Log:
Fix a bug reported by Bruce Lowekamp involving the interaction of
--gen-suppressions with leak checking. Added a regtest for it.
Added:
trunk/memcheck/tests/nanoleak2.c
trunk/memcheck/tests/nanoleak2.stderr.exp
trunk/memcheck/tests/nanoleak2.vgtest
Modified:
trunk/coregrind/m_errormgr.c
trunk/memcheck/tests/Makefile.am
Modified: trunk/coregrind/m_errormgr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_errormgr.c 2007-01-12 22:11:45 UTC (rev 6513)
+++ trunk/coregrind/m_errormgr.c 2007-01-12 23:59:50 UTC (rev 6514)
@@ -474,6 +474,8 @@
just for pretty printing purposes. */
static Bool is_first_shown_context =3D True;
=20
+static Int n_errs_shown =3D 0;
+
/* Top-level entry point to the error management subsystem.
All detected errors are notified here; this routine decides if/when t=
he
user should see the error. */
@@ -487,7 +489,6 @@
VgRes exe_res =3D Vg_MedRes;
static Bool stopping_message =3D False;
static Bool slowdown_message =3D False;
- static Int n_errs_shown =3D 0;
=20
/* After M_COLLECT_NO_ERRORS_AFTER_SHOWN different errors have
been found, or M_COLLECT_NO_ERRORS_AFTER_FOUND total errors
@@ -649,7 +650,8 @@
void* extra, ExeContext* where, Bool print_erro=
r,
Bool allow_db_attach, Bool count_error )
{
- Error err;
+ Error err;
+ Supp *su;
=20
/* Build ourselves the error */
construct_error ( &err, tid, ekind, a, s, extra, where );
@@ -663,7 +665,8 @@
not copying 'extra'. */
(void)VG_TDICT_CALL(tool_update_extra, &err);
=20
- if (NULL =3D=3D is_suppressible_error(&err)) {
+ su =3D is_suppressible_error(&err);
+ if (NULL =3D=3D su) {
if (count_error)
n_errs_found++;
=20
@@ -672,13 +675,14 @@
VG_(message)(Vg_UserMsg, "");
pp_Error(&err);
is_first_shown_context =3D False;
+ n_errs_shown++;
+ do_actions_on_error(&err, allow_db_attach);
}
- do_actions_on_error(&err, allow_db_attach);
-
return False;
=20
} else {
n_errs_suppressed++;
+ su->count++;
return True;
}
}
Modified: trunk/memcheck/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/Makefile.am 2007-01-12 22:11:45 UTC (rev 6513)
+++ trunk/memcheck/tests/Makefile.am 2007-01-12 23:59:50 UTC (rev 6514)
@@ -81,6 +81,7 @@
mmaptest.stderr.exp mmaptest.vgtest \
nanoleak.stderr.exp nanoleak.vgtest \
nanoleak_supp.stderr.exp nanoleak_supp.vgtest nanoleak.supp \
+ nanoleak2.stderr.exp nanoleak2.vgtest \
new_nothrow.stderr.exp new_nothrow.vgtest \
new_override.stderr.exp new_override.stdout.exp new_override.vgtest \
null_socket.stderr.exp null_socket.vgtest \
@@ -155,7 +156,7 @@
malloc_usable malloc1 malloc2 malloc3 manuel1 manuel2 manuel3 \
match-overrun \
memalign_test memalign2 memcmptest mempool mmaptest \
- nanoleak new_nothrow \
+ nanoleak nanoleak2 new_nothrow \
null_socket oset_test overlap \
partiallydefinedeq \
partial_load pdb-realloc pdb-realloc2 \
Added: trunk/memcheck/tests/nanoleak2.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/nanoleak2.c (rev 0)
+++ trunk/memcheck/tests/nanoleak2.c 2007-01-12 23:59:50 UTC (rev 6514)
@@ -0,0 +1,19 @@
+
+// Bruce Lowekamp <low...@si...> reported that in a program wi=
th a
+// reachable leak, if you do:
+//
+// valgrind --leak-check=3Dyes --gen-suppressions=3Dyes --show-reachab=
le=3Dno -q
+//
+// it gives the y/n/c suppression prompt for errors that aren't shown. =
This
+// test checks that is fixed.
+
+#include <stdlib.h>
+
+int* a;
+
+int main ( void )
+{
+ a =3D malloc(1000); // Becomes a reachable leak.
+ a[0] =3D 0;
+ return a[0];
+}
Added: trunk/memcheck/tests/nanoleak2.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Added: trunk/memcheck/tests/nanoleak2.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/nanoleak2.vgtest (rev 0)
+++ trunk/memcheck/tests/nanoleak2.vgtest 2007-01-12 23:59:50 UTC (rev 65=
14)
@@ -0,0 +1,2 @@
+vgopts: --leak-check=3Dyes --gen-suppressions=3Dyes --show-reachable=3Dn=
o -q
+prog: nanoleak2
|
|
From: <sv...@va...> - 2007-01-12 22:11:47
|
Author: sewardj
Date: 2007-01-12 22:11:45 +0000 (Fri, 12 Jan 2007)
New Revision: 6513
Log:
Merge r6510 (Handle DW_CFA_undefined)
Modified:
branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c 2007-0=
1-12 22:09:57 UTC (rev 6512)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c 2007-0=
1-12 22:11:45 UTC (rev 6513)
@@ -2224,6 +2224,16 @@
ctx->cfa_offset =3D off * ctx->data_a_f;
break;
=20
+ case DW_CFA_undefined:
+ reg =3D read_leb128( &instr[i], &nleb, 0);
+ i +=3D nleb;
+ if (reg < 0 || reg >=3D N_CFI_REGS)=20
+ return 0; /* fail */
+ ctx->reg[reg].tag =3D RR_Undef;
+ ctx->reg[reg].coff =3D 0;
+ ctx->reg[reg].reg =3D 0;
+ break;
+
case DW_CFA_GNU_args_size:
/* No idea what is supposed to happen. gdb-6.3 simply
ignores these. */
|
|
From: <sv...@va...> - 2007-01-12 22:10:03
|
Author: sewardj
Date: 2007-01-12 22:09:57 +0000 (Fri, 12 Jan 2007)
New Revision: 6512
Log:
Merge r6509 (ML_(read_callframe_info_dwarf2): deal better with CIEs
with no augmentation)
Modified:
branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readelf.c
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c 2007-0=
1-12 22:03:14 UTC (rev 6511)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c 2007-0=
1-12 22:09:57 UTC (rev 6512)
@@ -1420,6 +1420,136 @@
read_encoded_Addr.
*/
=20
+/* More badness re address encoding, 12 Jan 07.
+
+ Most gcc provided CIEs have a "zR" augmentation, which means they
+ supply their own address encoding, and that works fine. However,
+ some icc9 supplied CIEs have no augmentation, which means they use
+ the default_Addr_encoding(). That says to use a machine-word sized
+ value, literally unmodified.
+
+ Since .so's are, in general, relocated when loaded, having absolute
+ addresses in the CFI data makes no sense when read_encoded_Addr is
+ used to find the initial location for a FDE. The resulting saga:
+
+ TomH:
+ > I'm chasing a stack backtrace failure for an amd64 .so which was=20
+ > created I believe by icc 9.1. After a while I wound up looking at
+ > this: (readdwarf.c)
+ >
+ > 5083 tom static UChar default_Addr_encoding ( void )
+ > 3584 tom {
+ > 3584 tom switch (sizeof(Addr)) {
+ > 3584 tom case 4: return DW_EH_PE_udata4;
+ > 3584 tom case 8: return DW_EH_PE_udata8;
+ > 3584 tom default: vg_assert(0);
+ > 3584 tom }
+ > 3584 tom }
+ >
+ > If a CIE does not have an "augmentation string" (typically "zR") th=
en=20
+ > addresses are decoded as described by default_Addr_encoding. If th=
ere
+ > is an 'R' in the augmentation string then the encoding to use=20
+ > is specified by the CIE itself, which works fine with GCC compiled =
code
+ > since that always appears to specify zR.
+
+ Correct.
+
+ > Problem is this .so has no augmentation string and so uses the
+ > default encoding, viz DW_EH_PE_udata8. That appears to mean
+ > "read a 64 bit number" and use that as-is (for the starting value
+ > of the program counter when running the CFA program).
+
+ Strictly speaking the default is DW_EH_PE_absptr, but that amounts
+ to either udata4 or udata8 depending on the platform's pointer size
+ which is a shortcut I used.
+
+ > For this .so that gives nonsense (very small) PCs which are later
+ > rejected by the sanity check which ensures PC ranges fall inside
+ > the mapped text segment. It seems like the .so expects to have the
+ > start VMA of the text segment added on. This would correspond to
+ >
+ > static UChar default_Addr_encoding ( void )
+ > {
+ > switch (sizeof(Addr)) {
+ > case 4: return DW_EH_PE_textrel + DW_EH_PE_udata4;
+ > case 8: return DW_EH_PE_textrel + DW_EH_PE_udata8;
+ > default: vg_assert(0);
+ > }
+ > }
+
+ The problem you're seeing is that you have absolute pointers inside
+ a shared library, which obviously makes little sense on the face of
+ things as how would the linker know where the library will be
+ loaded?
+
+ The answer of course is that it doesn't, so if it points absolute
+ pointers in the frame unwind data is has to include relocations for
+ them, and I'm betting that if you look at the relocations in the
+ library you will there are some for that data.
+
+ That is fine of course when ld.so maps the library - it will
+ relocate the eh_frame data as it maps it (or prelinking will
+ already have done so) and when the g++ exception code kicks in and
+ unwinds the stack it will see relocated data.
+
+ We of course are mapping the section from the ELF file ourselves
+ and are not applying the relocations, hence the problem you are
+ seeing.
+
+ Strictly speaking we should apply the relocations but the cheap
+ solution is essentially to do what you've done - strictly speaking
+ you should adjust by the difference between the address the library
+ was linked for and the address it has been loaded at, but a shared
+ library will normally be linked for address zero I believe. It's
+ possible that prelinking might change that though?
+
+ JRS:
+ That all syncs with what I am seeing.
+
+ So what I am inclined to do is:
+
+ - Leave default_Addr_encoding as it is
+
+ - Change read_encoded_Addr's handling of "case DW_EH_PE_absptr" so
+ it sets base to, as you say, the difference between the address
+ the library was linked for and the address it has been loaded at
+ (=3D=3D the SegInfo's text_bias)
+
+ Does that sound sane? I think it should even handle the prelinked
+ case.
+
+ (JRS, later)
+
+ Hmm. Plausible as it sounds, it doesn't work. It now produces
+ bogus backtraces for locations inside the (statically linked)
+ memcheck executable.
+
+ Besides, there are a couple of other places where read_encoded_Addr
+ is used -- one of which is used to establish the length of the
+ address range covered by the current FDE:
+
+ fde_arange =3D read_encoded_Addr(&nbytes, &adi, data);
+
+ and it doesn't seem to make any sense for read_encoded_Addr to add
+ on the text segment bias in that context. The DWARF3 spec says
+ that both the initial_location and address_range (length) fields
+ are encoded the same way ("target address"), so it is unclear at
+ what stage in the process it would be appropriate to relocate the
+ former but not the latter.
+
+ One unprincipled kludge that does work is the following: just
+ before handing one of the address range fragments off to
+ ML_(addDiCfSI) for permanent storage, check its start address. If
+ that is very low (less than 2 M), and is far below the mapped text
+ segment, and adding the text bias would move the fragment entirely
+ inside the mapped text segment, then do so. A kind of kludged
+ last-minute relocation, if you like.
+
+ 12 Jan 07: committing said kludge (see kludge_then_addDiCfSI). If
+ the situation clarifies, it can easily enough be backed out and
+ replaced by a better fix.
+*/
+
/* --------------- Decls --------------- */
=20
#if defined(VGP_x86_linux)
@@ -2386,6 +2516,65 @@
}
}
=20
+
+/* Attempt to add a CFI record to the collection. Nominally this just
+ hands the record off to ML_(addDiCfSI), which will ignore it if it
+ falls outside the mapped text segment of this SegInfo. However, a
+ nasty kludge may be pre-applied: if the record's base address is
+ very small, and does not come anywhere near the mapped text
+ segment, then assume we forgot to add the text_bias for some
+ reason, so add it on and then try again. */
+static
+void kludge_then_addDiCfSI ( struct _SegInfo* si, DiCfSI* cfsi )
+{
+# define IN_TEXT_SEG(_addr) \
+ ((_addr) >=3D si->text_start_avma \
+ && (_addr) < (si->text_start_avma + si->text_size))
+
+ if ( /* "has implausibly low addr" */
+ cfsi->base < 2 * 1024 * 1024
+ /* "has plausible size" */
+ && cfsi->len > 0
+ && cfsi->len < 50000
+ /* "is well clear of the text segment" */
+ && (2 * (cfsi->base + cfsi->len)) < si->text_start_avma
+ /* "adding text_bias would put the start in the text segment */
+ && IN_TEXT_SEG(si->text_bias + cfsi->base)
+ /* "adding text_bias would put the end in the text segment */
+ && IN_TEXT_SEG(si->text_bias + cfsi->base + cfsi->len - 1)
+ /* XXX and there isn't already a record present */ )=20
+ {
+ static Int complaints =3D 3;
+
+ /* Oh, well, let's kludge it into the text segment, then. */
+ /* First, though, complain: */
+ if (VG_(clo_trace_cfi) || complaints > 0) {
+ complaints--;
+ if (VG_(clo_verbosity) > 1) {
+ VG_(message)(
+ Vg_DebugMsg,
+ "warning: DiCfSI %p .. %p kludge reloc to %p .. %p",
+ cfsi->base,=20
+ cfsi->base + cfsi->len - 1,
+ si->text_bias + cfsi->base,=20
+ si->text_bias + cfsi->base + cfsi->len - 1
+ );
+ }
+ if (VG_(clo_trace_cfi))=20
+ ML_(ppDiCfSI)(cfsi);
+ }
+
+ /* last but not least ... */
+ cfsi->base +=3D si->text_bias;
+ }
+
+ /* finished monkeying around, let's add it. */
+ ML_(addDiCfSI)(si, cfsi);
+
+# undef IN_TEXT_SEG
+}
+
+
/* Run the CF instructions in instrs[0 .. ilen-1], until the end is
reached, or until there is a failure. Return True iff success.=20
*/
@@ -2414,7 +2603,7 @@
if (loc_prev !=3D ctx->loc && si) {
summ_ok =3D summarise_context ( &cfsi, loc_prev, ctx );
if (summ_ok) {
- ML_(addDiCfSI)(si, &cfsi);
+ kludge_then_addDiCfSI(si, &cfsi);
if (VG_(clo_trace_cfi))
ML_(ppDiCfSI)(&cfsi);
}
@@ -2426,7 +2615,7 @@
if (si) {
summ_ok =3D summarise_context ( &cfsi, loc_prev, ctx );
if (summ_ok) {
- ML_(addDiCfSI)(si, &cfsi);
+ kludge_then_addDiCfSI(si, &cfsi);
if (VG_(clo_trace_cfi))
ML_(ppDiCfSI)(&cfsi);
}
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readelf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readelf.c 2007-01-=
12 22:03:14 UTC (rev 6511)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readelf.c 2007-01-=
12 22:09:57 UTC (rev 6512)
@@ -986,6 +986,11 @@
=20
si->text_bias =3D offset_oimage;
=20
+ if (VG_(clo_verbosity) > 2 || VG_(clo_trace_redir))
+ VG_(message)(Vg_DebugMsg, " svma %010p, avma %010p",=20
+ si->text_start_avma - si->text_bias,
+ si->text_start_avma );
+
/* If, after looking at all the program headers, we still didn't=20
find a soname, add a fake one. */
if (si->soname =3D=3D NULL) {
|
|
From: <sv...@va...> - 2007-01-12 22:03:24
|
Author: sewardj
Date: 2007-01-12 22:03:14 +0000 (Fri, 12 Jan 2007)
New Revision: 6511
Log:
Merge r6506,7,8: Non-functional changes - partially rename
variables/fields used during debuginfo reading for greater clarity.
Modified:
branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/debuginfo.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/priv_storage.h
branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readelf.c
branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/storage.c
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/debuginfo.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/debuginfo.c 2007-0=
1-12 19:21:22 UTC (rev 6510)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/debuginfo.c 2007-0=
1-12 22:03:14 UTC (rev 6511)
@@ -52,6 +52,35 @@
=20
=20
/*------------------------------------------------------------*/
+/*--- The _svma / _avma / _image / _bias naming scheme ---*/
+/*------------------------------------------------------------*/
+
+/* JRS 11 Jan 07: I find the different kinds of addresses involved in
+ debuginfo reading confusing. Recently I arrived at some
+ terminology which makes it clearer (to me, at least). There are 3
+ kinds of address used in the debuginfo reading process:
+=20
+ stated VMAs - the address where (eg) a .so says a symbol is, that
+ is, what it tells you if you consider the .so in
+ isolation
+=20
+ actual VMAs - the address where (eg) said symbol really wound up
+ after the .so was mapped into memory
+=20
+ image addresses - pointers into the copy of the .so (etc)
+ transiently mmaped aboard whilst we read its info
+
+ Additionally I use the term 'bias' to denote the difference
+ between stated and actual VMAs for a given entity.
+
+ This terminology is not used consistently, but a start has been
+ made. readelf.c and the call-frame info reader in readdwarf.c now
+ use it. Specifically, various variables and structure fields have
+ been annotated with _avma / _svma / _image / _bias.
+*/
+
+
+/*------------------------------------------------------------*/
/*--- Root structure ---*/
/*------------------------------------------------------------*/
=20
@@ -75,10 +104,10 @@
{
SegInfo* si =3D VG_(arena_calloc)(VG_AR_SYMTAB, 1, sizeof(SegInfo));
=20
- si->start =3D start;
- si->size =3D size;
- si->foffset =3D foffset;
- si->filename =3D VG_(arena_strdup)(VG_AR_SYMTAB, filename);
+ si->text_start_avma =3D start;
+ si->text_size =3D size;
+ si->foffset =3D foffset;
+ si->filename =3D VG_(arena_strdup)(VG_AR_SYMTAB, filename);
=20
// Everything else -- pointers, sizes, arrays -- is zeroed by calloc.
return si;
@@ -118,7 +147,8 @@
if (VG_(clo_verbosity) > 1 || VG_(clo_trace_redir))
VG_(message)(Vg_DebugMsg,=20
"Discarding syms at %p-%p in %s due to munmap()=
",=20
- si->start, si->start + si->size,
+ si->text_start_avma,=20
+ si->text_start_avma + si->text_size,
curr->filename ? curr->filename : (UChar*)"???"=
);
vg_assert(*prev_next_ptr =3D=3D curr);
*prev_next_ptr =3D curr->next;
@@ -150,8 +180,8 @@
while (True) {
if (curr =3D=3D NULL)
break;
- if (start+length-1 < curr->start=20
- || curr->start+curr->size-1 < start) {
+ if (start+length - 1 < curr->text_start_avma=20
+ || curr->text_start_avma + curr->text_size - 1 < start) {
/* no overlap */
} else {
found =3D True;
@@ -336,7 +366,8 @@
SegInfo* si;
=20
for (si =3D segInfo_list; si !=3D NULL; si =3D si->next) {
- if (si->start <=3D ptr && ptr < si->start+si->size) {
+ if (si->text_start_avma <=3D ptr=20
+ && ptr < si->text_start_avma + si->text_size) {
sno =3D ML_(search_one_symtab) ( si, ptr, match_anywhere_in_fun=
);
if (sno =3D=3D -1) goto not_found;
*symno =3D sno;
@@ -360,7 +391,8 @@
SegInfo* si;
=20
for (si =3D segInfo_list; si !=3D NULL; si =3D si->next) {
- if (si->start <=3D ptr && ptr < si->start+si->size) {
+ if (si->text_start_avma <=3D ptr=20
+ && ptr < si->text_start_avma + si->text_size) {
lno =3D ML_(search_one_loctab) ( si, ptr );
if (lno =3D=3D -1) goto not_found;
*locno =3D lno;
@@ -501,7 +533,8 @@
SegInfo* si;
=20
for (si =3D segInfo_list; si !=3D NULL; si =3D si->next) {
- if (si->start <=3D a && a < si->start+si->size) {
+ if (si->text_start_avma <=3D a=20
+ && a < si->text_start_avma + si->text_size) {
VG_(strncpy_safely)(buf, si->filename, nbuf);
return True;
}
@@ -516,7 +549,8 @@
SegInfo* si;
=20
for (si =3D segInfo_list; si !=3D NULL; si =3D si->next) {
- if (si->start <=3D a && a < si->start+si->size) {
+ if (si->text_start_avma <=3D a=20
+ && a < si->text_start_avma + si->text_size) {
return si;
}
}
@@ -893,12 +927,12 @@
=20
Addr VG_(seginfo_start)(const SegInfo* si)
{
- return si->start;
+ return si->text_start_avma;
}
=20
SizeT VG_(seginfo_size)(const SegInfo* si)
{
- return si->size;
+ return si->text_size;
}
=20
const UChar* VG_(seginfo_soname)(const SegInfo* si)
@@ -913,7 +947,7 @@
=20
ULong VG_(seginfo_sym_offset)(const SegInfo* si)
{
- return si->offset;
+ return si->text_bias;
}
=20
VgSectKind VG_(seginfo_sect_kind)(Addr a)
@@ -922,29 +956,30 @@
VgSectKind ret =3D Vg_SectUnknown;
=20
for(si =3D segInfo_list; si !=3D NULL; si =3D si->next) {
- if (a >=3D si->start && a < (si->start + si->size)) {
+ if (a >=3D si->text_start_avma=20
+ && a < si->text_start_avma + si->text_size) {
=20
if (0)
VG_(printf)(
"addr=3D%p si=3D%p %s got=3D%p %d plt=3D%p %d data=3D%p =
%d bss=3D%p %d\n",
a, si, si->filename,=20
- si->got_start_vma, si->got_size,
- si->plt_start_vma, si->plt_size,
- si->data_start_vma, si->data_size,
- si->bss_start_vma, si->bss_size);
+ si->got_start_avma, si->got_size,
+ si->plt_start_avma, si->plt_size,
+ si->data_start_avma, si->data_size,
+ si->bss_start_avma, si->bss_size);
=20
ret =3D Vg_SectText;
=20
- if (a >=3D si->data_start_vma && a < (si->data_start_vma + si->data_si=
ze))
+ if (a >=3D si->data_start_avma && a < si->data_start_avma + si->data_s=
ize)
ret =3D Vg_SectData;
else=20
- if (a >=3D si->bss_start_vma && a < (si->bss_start_vma + si->bs=
s_size))
+ if (a >=3D si->bss_start_avma && a < si->bss_start_avma + si->b=
ss_size)
ret =3D Vg_SectBSS;
else=20
- if (a >=3D si->plt_start_vma && a < (si->plt_start_vma + si->pl=
t_size))
+ if (a >=3D si->plt_start_avma && a < si->plt_start_avma + si->p=
lt_size)
ret =3D Vg_SectPLT;
else=20
- if (a >=3D si->got_start_vma && a < (si->got_start_vma + si->go=
t_size))
+ if (a >=3D si->got_start_avma && a < si->got_start_avma + si->g=
ot_size)
ret =3D Vg_SectGOT;
}
}
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/priv_storage=
.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/priv_storage.h 200=
7-01-12 19:21:22 UTC (rev 6510)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/priv_storage.h 200=
7-01-12 22:03:14 UTC (rev 6511)
@@ -34,6 +34,9 @@
This module was also extensively hacked on by Jeremy Fitzhardinge
and Tom Hughes.
*/
+/* See comment at top of debuginfo.c for explanation of
+ the _svma / _avma / _image / _bias naming scheme.
+*/
=20
#ifndef __PRIV_STORAGE_H
#define __PRIV_STORAGE_H
@@ -139,10 +142,10 @@
struct _SegInfo* next; /* list of SegInfos */
=20
/* Description of the mapped segment. */
- Addr start;
- UInt size;
+ Addr text_start_avma;
+ UInt text_size;
UChar* filename; /* in mallocville */
- OffT foffset;
+ OffT foffset; /* file offset for mapped text section - UNUSED */
UChar* soname;
=20
/* An expandable array of symbols. */
@@ -170,24 +173,25 @@
UChar strtab[SEGINFO_STRCHUNKSIZE];
} *strchunks;
=20
- /* 'offset' is what needs to be added to an address in the address
- space of the library as stored on disk (which is not 0-based for
- executables or prelinked libraries) to get an address in memory
- for the object loaded at 'start' */
- OffT offset;
+ /* 'text_bias' is what needs to be added to an address in the
+ address space of the library as stored on disk [a so-called
+ stated VMA] (which is not 0-based for executables or prelinked
+ libraries) to get an address in memory for the object loaded at
+ 'text_start_avma'. At least for text symbols. */
+ OffT text_bias;
=20
/* Bounds of data, BSS, PLT, GOT and OPD (for ppc64-linux) so that
tools can see what section an address is in. In the running
image! */
- Addr plt_start_vma;
+ Addr plt_start_avma;
UInt plt_size;
- Addr got_start_vma;
+ Addr got_start_avma;
UInt got_size;
- Addr opd_start_vma;
+ Addr opd_start_avma;
UInt opd_size;
- Addr data_start_vma;
+ Addr data_start_avma;
UInt data_size;
- Addr bss_start_vma;
+ Addr bss_start_avma;
UInt bss_size;
};
=20
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c 2007-0=
1-12 19:21:22 UTC (rev 6510)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readdwarf.c 2007-0=
1-12 22:03:14 UTC (rev 6511)
@@ -1592,15 +1592,13 @@
}
=20
=20
-/* A structure which holds information needed by read_encoded_Addr().
- Not sure what these address-like fields are -- really ought to
- distinguish properly svma/avma/image addresses.=20
+/* A structure which holds information needed by read_encoded_Addr().=20
*/
typedef
struct {
UChar encoding;
- UChar* ehframe;
- Addr ehframe_addr;
+ UChar* ehframe_image;
+ Addr ehframe_avma;
}
AddressDecodingInfo;
=20
@@ -1839,10 +1837,10 @@
UChar* data )
{
Addr base;
- Int offset;
- UChar encoding =3D adi->encoding;
- UChar* ehframe =3D adi->ehframe;
- Addr ehframe_addr =3D adi->ehframe_addr;
+ Word offset;
+ UChar encoding =3D adi->encoding;
+ UChar* ehframe_image =3D adi->ehframe_image;
+ Addr ehframe_avma =3D adi->ehframe_avma;
=20
vg_assert((encoding & DW_EH_PE_indirect) =3D=3D 0);
=20
@@ -1853,7 +1851,7 @@
base =3D 0;
break;
case DW_EH_PE_pcrel:
- base =3D ehframe_addr + ( data - ehframe );
+ base =3D ehframe_avma + ( data - ehframe_image );
break;
case DW_EH_PE_datarel:
vg_assert(0);
@@ -1868,7 +1866,7 @@
break;
case DW_EH_PE_aligned:
base =3D 0;
- offset =3D data - ehframe;
+ offset =3D data - ehframe_image;
if ((offset % sizeof(Addr)) !=3D 0) {
*nbytes =3D sizeof(Addr) - (offset % sizeof(Addr));
data +=3D *nbytes;
@@ -2477,12 +2475,12 @@
=20
void ML_(read_callframe_info_dwarf2)=20
( /*OUT*/struct _SegInfo* si,=20
- UChar* ehframe, Int ehframe_sz, Addr ehframe_addr )
+ UChar* ehframe_image, Int ehframe_sz, Addr ehframe_avma )
{
Int nbytes;
HChar* how =3D NULL;
Int n_CIEs =3D 0;
- UChar* data =3D ehframe;
+ UChar* data =3D ehframe_image;
=20
# if defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
/* These targets don't use CFI-based stack unwinding. */
@@ -2491,8 +2489,8 @@
=20
if (VG_(clo_trace_cfi)) {
VG_(printf)("\n-----------------------------------------------\n")=
;
- VG_(printf)("CFI info: ehframe %p, ehframe_sz %d\n",
- ehframe, ehframe_sz );
+ VG_(printf)("CFI info: szB %d, _avma %p, _image %p\n",
+ ehframe_sz, (void*)ehframe_avma, (void*)ehframe_image );
VG_(printf)("CFI info: name %s\n",
si->filename );
}
@@ -2524,11 +2522,11 @@
UInt cie_pointer;
=20
/* Are we done? */
- if (data =3D=3D ehframe + ehframe_sz)
+ if (data =3D=3D ehframe_image + ehframe_sz)
return;
=20
/* Overshot the end? Means something is wrong */
- if (data > ehframe + ehframe_sz) {
+ if (data > ehframe_image + ehframe_sz) {
how =3D "overran the end of .eh_frame";
goto bad;
}
@@ -2538,8 +2536,8 @@
=20
ciefde_start =3D data;
if (VG_(clo_trace_cfi))=20
- VG_(printf)("\ncie/fde.start =3D %p (ehframe + 0x%x)\n",=20
- ciefde_start, ciefde_start - ehframe);
+ VG_(printf)("\ncie/fde.start =3D %p (ehframe_image + 0x%x)\n"=
,=20
+ ciefde_start, ciefde_start - ehframe_image);
=20
ciefde_len =3D read_UInt(data); data +=3D sizeof(UInt);
if (VG_(clo_trace_cfi))=20
@@ -2549,7 +2547,7 @@
of the sequence. ?? Neither the DWARF2 spec not the AMD64
ABI spec say this, though. */
if (ciefde_len =3D=3D 0) {
- if (data =3D=3D ehframe + ehframe_sz)
+ if (data =3D=3D ehframe_image + ehframe_sz)
return;
how =3D "zero-sized CIE/FDE but not at section end";
goto bad;
@@ -2585,7 +2583,7 @@
=20
/* Record its offset. This is how we will find it again
later when looking at an FDE. */
- the_CIEs[this_CIE].offset =3D ciefde_start - ehframe;
+ the_CIEs[this_CIE].offset =3D ciefde_start - ehframe_image;
=20
cie_version =3D read_UChar(data); data +=3D sizeof(UChar);
if (VG_(clo_trace_cfi))
@@ -2694,9 +2692,9 @@
=20
if (VG_(clo_trace_cfi)) {
AddressDecodingInfo adi;
- adi.encoding =3D the_CIEs[this_CIE].address_encoding;
- adi.ehframe =3D ehframe;
- adi.ehframe_addr =3D ehframe_addr;
+ adi.encoding =3D the_CIEs[this_CIE].address_encoding;
+ adi.ehframe_image =3D ehframe_image;
+ adi.ehframe_avma =3D ehframe_avma;
show_CF_instructions(the_CIEs[this_CIE].instrs,=20
the_CIEs[this_CIE].ilen, &adi );
}
@@ -2720,7 +2718,7 @@
=20
/* re sizeof(UInt), matches XXX above. For 64-bit dwarf this
will have to be a ULong instead. */
- look_for =3D (data - sizeof(UInt) - ehframe) - cie_pointer;
+ look_for =3D (data - sizeof(UInt) - ehframe_image) - cie_pointe=
r;
=20
for (cie =3D 0; cie < n_CIEs; cie++) {
if (0) VG_(printf)("look for %d %d\n",
@@ -2734,17 +2732,17 @@
goto bad;
}
=20
- adi.encoding =3D the_CIEs[cie].address_encoding;
- adi.ehframe =3D ehframe;
- adi.ehframe_addr =3D ehframe_addr;
+ adi.encoding =3D the_CIEs[cie].address_encoding;
+ adi.ehframe_image =3D ehframe_image;
+ adi.ehframe_avma =3D ehframe_avma;
fde_initloc =3D read_encoded_Addr(&nbytes, &adi, data);
data +=3D nbytes;
if (VG_(clo_trace_cfi))=20
VG_(printf)("fde.initloc =3D %p\n", (void*)fde_initloc);
=20
- adi.encoding =3D the_CIEs[cie].address_encoding & 0xf;
- adi.ehframe =3D ehframe;
- adi.ehframe_addr =3D ehframe_addr;
+ adi.encoding =3D the_CIEs[cie].address_encoding & 0xf;
+ adi.ehframe_image =3D ehframe_image;
+ adi.ehframe_avma =3D ehframe_avma;
fde_arange =3D read_encoded_Addr(&nbytes, &adi, data);
data +=3D nbytes;
if (VG_(clo_trace_cfi))=20
@@ -2769,9 +2767,9 @@
=20
data +=3D fde_ilen;
=20
- adi.encoding =3D the_CIEs[cie].address_encoding;
- adi.ehframe =3D ehframe;
- adi.ehframe_addr =3D ehframe_addr;
+ adi.encoding =3D the_CIEs[cie].address_encoding;
+ adi.ehframe_image =3D ehframe_image;
+ adi.ehframe_avma =3D ehframe_avma;
=20
if (VG_(clo_trace_cfi))
show_CF_instructions(fde_instrs, fde_ilen, &adi);
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readelf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readelf.c 2007-01-=
12 19:21:22 UTC (rev 6510)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/readelf.c 2007-01-=
12 22:03:14 UTC (rev 6511)
@@ -232,9 +232,9 @@
if (!plausible
&& ELFXX_ST_TYPE(sym->st_info) =3D=3D STT_NOTYPE
&& sym->st_size > 0
- && si->opd_start_vma !=3D 0
- && sym_addr >=3D si->opd_start_vma
- && sym_addr < si->opd_start_vma + si->opd_size)
+ && si->opd_start_avma !=3D 0
+ && sym_addr >=3D si->opd_start_avma
+ && sym_addr < si->opd_start_avma + si->opd_size)
plausible =3D True;
# endif
=20
@@ -261,15 +261,15 @@
=20
/* If it's apparently in a GOT or PLT, it's really a reference to a
symbol defined elsewhere, so ignore it. */
- if (si->got_start_vma !=3D 0
- && sym_addr >=3D si->got_start_vma=20
- && sym_addr < si->got_start_vma + si->got_size) {
+ if (si->got_start_avma !=3D 0
+ && sym_addr >=3D si->got_start_avma=20
+ && sym_addr < si->got_start_avma + si->got_size) {
TRACE_SYMTAB(" ignore -- in GOT: %s\n", sym_name);
return False;
}
- if (si->plt_start_vma !=3D 0
- && sym_addr >=3D si->plt_start_vma
- && sym_addr < si->plt_start_vma + si->plt_size) {
+ if (si->plt_start_avma !=3D 0
+ && sym_addr >=3D si->plt_start_avma
+ && sym_addr < si->plt_start_avma + si->plt_size) {
TRACE_SYMTAB(" ignore -- in PLT: %s\n", sym_name);
return False;
}
@@ -284,9 +284,9 @@
*/
is_in_opd =3D False;
=20
- if (si->opd_start_vma !=3D 0
- && sym_addr >=3D si->opd_start_vma
- && sym_addr < si->opd_start_vma + si->opd_size) {
+ if (si->opd_start_avma !=3D 0
+ && sym_addr >=3D si->opd_start_avma
+ && sym_addr < si->opd_start_avma + si->opd_size) {
# if !defined(VGP_ppc64_linux)
TRACE_SYMTAB(" ignore -- in OPD: %s\n", sym_name);
return False;
@@ -306,7 +306,7 @@
the vma of the opd section start, so we can figure out how
far into the opd section this is. */
=20
- offset_in_opd =3D (Addr)sym_addr - (Addr)(si->opd_start_vma);
+ offset_in_opd =3D (Addr)sym_addr - (Addr)(si->opd_start_avma);
if (offset_in_opd < 0 || offset_in_opd >=3D si->opd_size) {
TRACE_SYMTAB(" ignore -- invalid OPD offset: %s\n", sym_name=
);
return False;
@@ -345,7 +345,7 @@
/* Here's yet another ppc64-linux hack. Get rid of leading dot if
the symbol is outside .opd. */
# if defined(VGP_ppc64_linux)
- if (si->opd_start_vma !=3D 0
+ if (si->opd_start_avma !=3D 0
&& !is_in_opd
&& sym_name[0] =3D=3D '.') {
vg_assert(!(*from_opd_out));
@@ -355,11 +355,12 @@
=20
/* If no part of the symbol falls within the mapped range,
ignore it. */
- if (*sym_addr_out + *sym_size_out <=3D si->start
- || *sym_addr_out >=3D si->start+si->size) {
+ if (*sym_addr_out + *sym_size_out <=3D si->text_start_avma
+ || *sym_addr_out >=3D si->text_start_avma + si->text_size) {
TRACE_SYMTAB( "ignore -- %p .. %p outside mapped range %p .. %p\n"=
,
*sym_addr_out, *sym_addr_out + *sym_size_out,
- si->start, si->start+si->size);
+ si->text_start_avma,
+ si->text_start_avma + si->text_size);
return False;
}
=20
@@ -368,9 +369,9 @@
section. This would completely mess up function redirection and
intercepting. This assert ensures that any symbols that make it
into the symbol table on ppc64-linux don't point into .opd. */
- if (si->opd_start_vma !=3D 0) {
- vg_assert(*sym_addr_out + *sym_size_out <=3D si->opd_start_vma
- || *sym_addr_out >=3D si->opd_start_vma + si->opd_size);
+ if (si->opd_start_avma !=3D 0) {
+ vg_assert(*sym_addr_out + *sym_size_out <=3D si->opd_start_avma
+ || *sym_addr_out >=3D si->opd_start_avma + si->opd_size)=
;
}
# endif
=20
@@ -825,7 +826,7 @@
oimage =3D (Addr)NULL;
if (VG_(clo_verbosity) > 1 || VG_(clo_trace_redir))
VG_(message)(Vg_DebugMsg, "Reading syms from %s (%p)",=20
- si->filename, si->start );
+ si->filename, si->text_start_avma );
=20
/* mmap the object image aboard, so that we can read symbols and
line number info out of it. It will be munmapped immediately
@@ -857,6 +858,11 @@
=20
oimage =3D sres.val;
=20
+ if (0) {
+ VG_(printf)("read_elf_debug_info: OIMAGE =3D %p - %p\n",=20
+ (void*)oimage, (void*)(oimage + (UWord)n_oimage));
+ }
+
/* Ok, the object image is safely in oimage[0 .. n_oimage-1].=20
Now verify that it is a valid ELF .so or executable image.
*/
@@ -926,7 +932,7 @@
=20
if (!offset_set) {
offset_set =3D True;
- offset_oimage =3D si->start - o_phdr->p_vaddr;
+ offset_oimage =3D si->text_start_avma - o_phdr->p_vaddr;
baseaddr =3D o_phdr->p_vaddr;
}
=20
@@ -940,11 +946,11 @@
// Get the data and bss start/size if appropriate
mapped =3D o_phdr->p_vaddr + offset_oimage;
mapped_end =3D mapped + o_phdr->p_memsz;
- if (si->data_start_vma =3D=3D 0 &&
+ if (si->data_start_avma =3D=3D 0 &&
(o_phdr->p_flags & (PF_R|PF_W|PF_X)) =3D=3D (PF_R|PF_W)) {
- si->data_start_vma =3D mapped;
- si->data_size =3D o_phdr->p_filesz;
- si->bss_start_vma =3D mapped + o_phdr->p_filesz;
+ si->data_start_avma =3D mapped;
+ si->data_size =3D o_phdr->p_filesz;
+ si->bss_start_avma =3D mapped + o_phdr->p_filesz;
if (o_phdr->p_memsz > o_phdr->p_filesz)
si->bss_size =3D o_phdr->p_memsz - o_phdr->p_filesz;
else
@@ -954,23 +960,31 @@
mapped =3D mapped & ~(VKI_PAGE_SIZE-1);
mapped_end =3D (mapped_end + VKI_PAGE_SIZE - 1) & ~(VKI_PAGE_SIZE-1);
=20
- if (VG_(needs).data_syms &&
- (mapped >=3D si->start && mapped <=3D (si->start+si->size)) &&
- (mapped_end > (si->start+si->size))) {
- UInt newsz =3D mapped_end - si->start;
- if (newsz > si->size) {
+ if (VG_(needs).data_syms=20
+ && mapped >=3D si->text_start_avma=20
+ && mapped <=3D (si->text_start_avma + si->text_size)
+ && mapped_end > (si->text_start_avma + si->text_size)) {
+ /* XXX jrs 2007 Jan 11: what's going on here? If data
+ syms are involved, surely we shouldn't be messing with
+ the segment's text_size unless there is an assumption
+ that the data segment has been mapped immediately after
+ the text segment. Which doesn't sound good to me. */
+ UInt newsz =3D mapped_end - si->text_start_avma;
+ if (newsz > si->text_size) {
if (0)
VG_(printf)("extending mapping %p..%p %d -> ..%p %d\n",=20
- si->start, si->start+si->size, si->size,
- si->start+newsz, newsz);
+ si->text_start_avma,=20
+ si->text_start_avma + si->text_size,=20
+ si->text_size,
+ si->text_start_avma + newsz, newsz);
=20
- si->size =3D newsz;
+ si->text_size =3D newsz;
}
}
}
}
=20
- si->offset =3D offset_oimage;
+ si->text_bias =3D offset_oimage;
=20
/* If, after looking at all the program headers, we still didn't=20
find a soname, add a fake one. */
@@ -994,7 +1008,7 @@
information */
{
/* Pointers to start of sections (in the oimage, not in the
- running image) */
+ running image) -- image addresses */
UChar* o_strtab =3D NULL; /* .strtab */
ElfXX_Sym* o_symtab =3D NULL; /* .symtab */
UChar* o_dynstr =3D NULL; /* .dynstr */
@@ -1033,9 +1047,9 @@
UInt dwarf1l_sz =3D 0;
UInt ehframe_sz =3D 0;
=20
- /* Section virtual addresses */
- Addr dummy_vma =3D 0;
- Addr ehframe_vma =3D 0;
+ /* Section actual virtual addresses */
+ Addr dummy_avma =3D 0;
+ Addr ehframe_avma =3D 0;
=20
/* Find all interesting sections */
=20
@@ -1073,29 +1087,29 @@
=20
/* Nb: must find where .got and .plt sections will be in the
* executable image, not in the object image transiently loaded=
. */
- /* NAME SIZE ADDR_IN_OIMAGE ADDR_WHEN=
_MAPPED */
- FIND(".dynsym", o_dynsym_sz, o_dynsym, dummy_vma=
)
- FIND(".dynstr", o_dynstr_sz, o_dynstr, dummy_vma=
)
- FIND(".symtab", o_symtab_sz, o_symtab, dummy_vma=
)
- FIND(".strtab", o_strtab_sz, o_strtab, dummy_vma=
)
+ /* NAME SIZE ADDR_IN_OIMAGE ADDR_WHEN_=
MAPPED */
+ FIND(".dynsym", o_dynsym_sz, o_dynsym, dummy_avma=
)
+ FIND(".dynstr", o_dynstr_sz, o_dynstr, dummy_avma=
)
+ FIND(".symtab", o_symtab_sz, o_symtab, dummy_avma=
)
+ FIND(".strtab", o_strtab_sz, o_strtab, dummy_avma=
)
=20
- FIND(".gnu_debuglink", debuglink_sz, debuglink, dummy_vma=
)
+ FIND(".gnu_debuglink", debuglink_sz, debuglink, dummy_avma=
)
=20
- FIND(".stab", stab_sz, stab, dummy_vma=
)
- FIND(".stabstr", stabstr_sz, stabstr, dummy_vma=
)
+ FIND(".stab", stab_sz, stab, dummy_avma=
)
+ FIND(".stabstr", stabstr_sz, stabstr, dummy_avma=
)
=20
- FIND(".debug_line", debug_line_sz, debug_line, dummy_vma=
)
- FIND(".debug_info", debug_info_sz, debug_info, dummy_vma=
)
- FIND(".debug_abbrev", debug_abbv_sz, debug_abbv, dummy_vma=
)
- FIND(".debug_str", debug_str_sz, debug_str, dummy_vma=
)
+ FIND(".debug_line", debug_line_sz, debug_line, dummy_avma=
)
+ FIND(".debug_info", debug_info_sz, debug_info, dummy_avma=
)
+ FIND(".debug_abbrev", debug_abbv_sz, debug_abbv, dummy_avma=
)
+ FIND(".debug_str", debug_str_sz, debug_str, dummy_avma=
)
=20
- FIND(".debug", dwarf1d_sz, dwarf1d, dummy_vma=
)
- FIND(".line", dwarf1l_sz, dwarf1l, dummy_vma=
)
- FIND(".eh_frame", ehframe_sz, ehframe, ehframe_v=
ma)
+ FIND(".debug", dwarf1d_sz, dwarf1d, dummy_avma=
)
+ FIND(".line", dwarf1l_sz, dwarf1l, dummy_avma=
)
+ FIND(".eh_frame", ehframe_sz, ehframe, ehframe_av=
ma)
=20
- FIND(".got", si->got_size, dummy_filea, si->got_s=
tart_vma)
- FIND(".plt", si->plt_size, dummy_filea, si->plt_s=
tart_vma)
- FIND(".opd", si->opd_size, opd_filea, si->opd_s=
tart_vma)
+ FIND(".got", si->got_size, dummy_filea, si->got_st=
art_avma)
+ FIND(".plt", si->plt_size, dummy_filea, si->plt_st=
art_avma)
+ FIND(".opd", si->opd_size, opd_filea, si->opd_st=
art_avma)
=20
# undef FIND
}
@@ -1124,7 +1138,7 @@
for (i =3D 0; i < ehdr->e_phnum; i++) {
ElfXX_Phdr *o_phdr =3D &((ElfXX_Phdr *)(dimage + ehdr-=
>e_phoff))[i];
if (o_phdr->p_type =3D=3D PT_LOAD) {
- offset_dimage =3D si->start - o_phdr->p_vaddr;
+ offset_dimage =3D si->text_start_avma - o_phdr->p_v=
addr;
break;
}
}
@@ -1137,7 +1151,7 @@
sh_strtab =3D (UChar*)(dimage + shdr[ehdr->e_shstrndx].sh=
_offset);
=20
/* Same deal as previous FIND, except simpler - doesn't
- look for vma, only oimage address. */
+ look for avma, only oimage address. */
=20
/* Find all interesting sections */
for (i =3D 0; i < ehdr->e_shnum; i++) {
@@ -1161,6 +1175,7 @@
} \
}
=20
+ /* ?? NAME SIZE ADDR_I=
N_OIMAGE */
FIND(need_symtab, ".symtab", o_symtab_sz, o_sy=
mtab)
FIND(need_symtab, ".strtab", o_strtab_sz, o_st=
rtab)
FIND(1, ".stab", stab_sz, stab=
)
@@ -1202,7 +1217,8 @@
=20
/* Read .eh_frame (call-frame-info) if any */
if (ehframe) {
- ML_(read_callframe_info_dwarf2) ( si, ehframe, ehframe_sz, ehfr=
ame_vma );
+ ML_(read_callframe_info_dwarf2)
+ ( si, ehframe/*image*/, ehframe_sz, ehframe_avma );
}
=20
/* Read the stabs and/or dwarf2 debug information, if any. It
Modified: branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/storage.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/storage.c 2007-01-=
12 19:21:22 UTC (rev 6510)
+++ branches/VALGRIND_3_2_BRANCH/coregrind/m_debuginfo/storage.c 2007-01-=
12 22:03:14 UTC (rev 6511)
@@ -253,13 +253,16 @@
size =3D 1;
}
=20
- /* vg_assert(this < si->start + si->size && next-1 >=3D si->start); *=
/
- if (this >=3D si->start + si->size || next-1 < si->start) {
+ /* vg_assert(this < si->text_start_avma + si->size=20
+ && next-1 >=3D si->text_start_avma); */
+ if (this >=3D si->text_start_avma + si->text_size=20
+ || next-1 < si->text_start_avma) {
if (0)
VG_(message)(Vg_DebugMsg,=20
"warning: ignoring line info entry falling "
"outside current SegInfo: %p %p %p %p",
- si->start, si->start + si->size,=20
+ si->text_start_avma,=20
+ si->text_start_avma + si->text_size,=20
this, next-1);
return;
}
@@ -319,8 +322,8 @@
/* Rule out ones which are completely outside the segment. These
probably indicate some kind of bug, but for the meantime ignore
them. */
- if ( cfsi->base + cfsi->len - 1 < si->start
- || si->start + si->size - 1 < cfsi->base ) {
+ if ( cfsi->base + cfsi->len - 1 < si->text_start_avma
+ || si->text_start_avma + si->text_size - 1 < cfsi->base ) {
static Int complaints =3D 3;
if (VG_(clo_trace_cfi) || complaints > 0) {
complaints--;
@@ -330,8 +333,8 @@
"warning: DiCfSI %p .. %p outside segment %p .. %p",
cfsi->base,=20
cfsi->base + cfsi->len - 1,
- si->start,
- si->start + si->size - 1=20
+ si->text_start_avma,
+ si->text_start_avma + si->text_size - 1=20
);
}
if (VG_(clo_trace_cfi))=20
|
|
From: Bruce L. <low...@si...> - 2007-01-12 21:29:04
|
This exists at least from 3.2.1 and is in trunk as well as branch32.
When using memcheck to check for leaks with gen-suppressions=yes and
--show-reachable=no, reachable blocks are pushed through the
record_leak_error code and unique_error code with the
print_record/print_error flag=false. The result is that no
information is printed about the reachable block, but the
==26027== ---- Print suppression ? --- [Return/N/n/Y/y/C/c] ---- y
prompt is still printed. This can obviously happen hundreds or
thousands of times in between actual unreachable blocks that might
want to be repressed in the future.
I did this to fix it:
Index: m_errormgr.c
===================================================================
--- m_errormgr.c (revision 6510)
+++ m_errormgr.c (working copy)
@@ -672,8 +672,8 @@
VG_(message)(Vg_UserMsg, "");
pp_Error(&err);
is_first_shown_context = False;
+ do_actions_on_error(&err, allow_db_attach);
}
- do_actions_on_error(&err, allow_db_attach);
return False;
and I can't imagine why one would want to attach to an unprinted error
anywhere, either, but I guess the other option would be not to push
unprinted leaks through this code.
Bruce
|
|
From: <sv...@va...> - 2007-01-12 21:26:52
|
Author: sewardj
Date: 2007-01-12 21:26:51 +0000 (Fri, 12 Jan 2007)
New Revision: 1727
Log:
Merge r1725 (Implement rcl{b,w,l,q} on amd64.)
Modified:
branches/VEX_3_2_BRANCH/priv/guest-amd64/gdefs.h
branches/VEX_3_2_BRANCH/priv/guest-amd64/ghelpers.c
branches/VEX_3_2_BRANCH/priv/guest-amd64/toIR.c
Modified: branches/VEX_3_2_BRANCH/priv/guest-amd64/gdefs.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_2_BRANCH/priv/guest-amd64/gdefs.h 2007-01-12 20:31:49 =
UTC (rev 1726)
+++ branches/VEX_3_2_BRANCH/priv/guest-amd64/gdefs.h 2007-01-12 21:26:51 =
UTC (rev 1727)
@@ -111,6 +111,10 @@
ULong arg, ULong rot_amt, ULong rflags_in, Long sz=20
);
=20
+extern ULong amd64g_calculate_RCL (=20
+ ULong arg, ULong rot_amt, ULong rflags_in, Long sz=20
+ );
+
extern ULong amd64g_check_fldcw ( ULong fpucw );
=20
extern ULong amd64g_create_fpucw ( ULong fpround );
Modified: branches/VEX_3_2_BRANCH/priv/guest-amd64/ghelpers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_2_BRANCH/priv/guest-amd64/ghelpers.c 2007-01-12 20:31:=
49 UTC (rev 1726)
+++ branches/VEX_3_2_BRANCH/priv/guest-amd64/ghelpers.c 2007-01-12 21:26:=
51 UTC (rev 1727)
@@ -1899,7 +1899,73 @@
return wantRflags ? rflags_in : arg;
}
=20
+ULong amd64g_calculate_RCL ( ULong arg,=20
+ ULong rot_amt,=20
+ ULong rflags_in,=20
+ Long szIN )
+{
+ Bool wantRflags =3D toBool(szIN < 0);
+ ULong sz =3D wantRflags ? (-szIN) : szIN;
+ ULong tempCOUNT =3D rot_amt & (sz =3D=3D 8 ? 0x3F : 0x1F);
+ ULong cf=3D0, of=3D0, tempcf;
=20
+ switch (sz) {
+ case 8:
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D (arg >> 63) & 1;
+ arg =3D (arg << 1) | (cf & 1);
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ of =3D ((arg >> 63) ^ cf) & 1;
+ break;
+ case 4:
+ while (tempCOUNT >=3D 33) tempCOUNT -=3D 33;
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D (arg >> 31) & 1;
+ arg =3D 0xFFFFFFFFULL & ((arg << 1) | (cf & 1));
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ of =3D ((arg >> 31) ^ cf) & 1;
+ break;
+ case 2:
+ while (tempCOUNT >=3D 17) tempCOUNT -=3D 17;
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D (arg >> 15) & 1;
+ arg =3D 0xFFFFULL & ((arg << 1) | (cf & 1));
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ of =3D ((arg >> 15) ^ cf) & 1;
+ break;
+ case 1:
+ while (tempCOUNT >=3D 9) tempCOUNT -=3D 9;
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D (arg >> 7) & 1;
+ arg =3D 0xFFULL & ((arg << 1) | (cf & 1));
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ of =3D ((arg >> 7) ^ cf) & 1;
+ break;
+ default:=20
+ vpanic("calculate_RCL(amd64g): invalid size");
+ }
+
+ cf &=3D 1;
+ of &=3D 1;
+ rflags_in &=3D ~(AMD64G_CC_MASK_C | AMD64G_CC_MASK_O);
+ rflags_in |=3D (cf << AMD64G_CC_SHIFT_C) | (of << AMD64G_CC_SHIFT_O);
+
+ return wantRflags ? rflags_in : arg;
+}
+
+
/* CALLED FROM GENERATED CODE */
/* DIRTY HELPER (non-referentially-transparent) */
/* Horrible hack. On non-amd64 platforms, return 1. */
Modified: branches/VEX_3_2_BRANCH/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_2_BRANCH/priv/guest-amd64/toIR.c 2007-01-12 20:31:49 U=
TC (rev 1726)
+++ branches/VEX_3_2_BRANCH/priv/guest-amd64/toIR.c 2007-01-12 21:26:51 U=
TC (rev 1727)
@@ -2996,7 +2996,7 @@
/* delta on entry points at the modrm byte. */
HChar dis_buf[50];
Int len;
- Bool isShift, isRotate, isRotateRC;
+ Bool isShift, isRotate, isRotateC;
IRType ty =3D szToITy(sz);
IRTemp dst0 =3D newTemp(ty);
IRTemp dst1 =3D newTemp(ty);
@@ -3020,14 +3020,15 @@
isRotate =3D False;
switch (gregLO3ofRM(modrm)) { case 0: case 1: isRotate =3D True; }
=20
- isRotateRC =3D toBool(gregLO3ofRM(modrm) =3D=3D 3);
+ isRotateC =3D False;
+ switch (gregLO3ofRM(modrm)) { case 2: case 3: isRotateC =3D True; }
=20
- if (!isShift && !isRotate && !isRotateRC) {
+ if (!isShift && !isRotate && !isRotateC) {
vex_printf("\ncase %d\n", gregLO3ofRM(modrm));
vpanic("dis_Grp2(Reg): unhandled case(amd64)");
}
=20
- if (isRotateRC) {
+ if (isRotateC) {
/* Call a helper; this insn is so ridiculous it does not deserve
better. One problem is, the helper has to calculate both the
new value and the new flags. This is more than 64 bits, and
@@ -3036,6 +3037,7 @@
using the sign of the sz field to indicate whether it is the
value or rflags result we want.
*/
+ Bool left =3D toBool(gregLO3ofRM(modrm) =3D=3D 2);
IRExpr** argsVALUE;
IRExpr** argsRFLAGS;
=20
@@ -3054,7 +3056,8 @@
mkIRExprCCall(
Ity_I64,=20
0/*regparm*/,=20
- "amd64g_calculate_RCR", &amd64g_calculate_RCR,
+ left ? "amd64g_calculate_RCL" : "amd64g_calculate_RC=
R",
+ left ? &amd64g_calculate_RCL : &amd64g_calculate_RC=
R,
argsVALUE
)
);
@@ -3068,7 +3071,8 @@
mkIRExprCCall(
Ity_I64,=20
0/*regparm*/,=20
- "amd64g_calculate_RCR", &amd64g_calculate_RCR,
+ left ? "amd64g_calculate_RCL" : "amd64g_calculate_RC=
R",
+ left ? &amd64g_calculate_RCL : &amd64g_calculate_RC=
R,
argsRFLAGS
)
);
|
|
From: <sv...@va...> - 2007-01-12 20:32:01
|
Author: sewardj Date: 2007-01-12 20:31:49 +0000 (Fri, 12 Jan 2007) New Revision: 1726 Log: Update. Modified: trunk/test/test-amd64.c Modified: trunk/test/test-amd64.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/test/test-amd64.c 2007-01-12 20:29:01 UTC (rev 1725) +++ trunk/test/test-amd64.c 2007-01-12 20:31:49 UTC (rev 1726) @@ -1,7 +1,7 @@ =20 /* To build:=20 =20 - gcc -O -g -o test-amd64 test-amd64.c -lm + gcc -g -o test-amd64 test-amd64.c -lm =20 */ =20 @@ -134,11 +134,9 @@ #define OP_CC #include "test-amd64-shift.h" =20 -#if 0 #define OP rcl #define OP_CC #include "test-amd64-shift.h" -#endif =20 #if 0 #define OP shld |
|
From: <sv...@va...> - 2007-01-12 20:29:10
|
Author: sewardj
Date: 2007-01-12 20:29:01 +0000 (Fri, 12 Jan 2007)
New Revision: 1725
Log:
Implement rcl{b,w,l,q} on amd64.
Modified:
trunk/priv/guest-amd64/gdefs.h
trunk/priv/guest-amd64/ghelpers.c
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/gdefs.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-amd64/gdefs.h 2007-01-10 05:22:03 UTC (rev 1724)
+++ trunk/priv/guest-amd64/gdefs.h 2007-01-12 20:29:01 UTC (rev 1725)
@@ -112,6 +112,10 @@
ULong arg, ULong rot_amt, ULong rflags_in, Long sz=20
);
=20
+extern ULong amd64g_calculate_RCL (=20
+ ULong arg, ULong rot_amt, ULong rflags_in, Long sz=20
+ );
+
extern ULong amd64g_check_fldcw ( ULong fpucw );
=20
extern ULong amd64g_create_fpucw ( ULong fpround );
Modified: trunk/priv/guest-amd64/ghelpers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-amd64/ghelpers.c 2007-01-10 05:22:03 UTC (rev 1724)
+++ trunk/priv/guest-amd64/ghelpers.c 2007-01-12 20:29:01 UTC (rev 1725)
@@ -1899,7 +1899,73 @@
return wantRflags ? rflags_in : arg;
}
=20
+ULong amd64g_calculate_RCL ( ULong arg,=20
+ ULong rot_amt,=20
+ ULong rflags_in,=20
+ Long szIN )
+{
+ Bool wantRflags =3D toBool(szIN < 0);
+ ULong sz =3D wantRflags ? (-szIN) : szIN;
+ ULong tempCOUNT =3D rot_amt & (sz =3D=3D 8 ? 0x3F : 0x1F);
+ ULong cf=3D0, of=3D0, tempcf;
=20
+ switch (sz) {
+ case 8:
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D (arg >> 63) & 1;
+ arg =3D (arg << 1) | (cf & 1);
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ of =3D ((arg >> 63) ^ cf) & 1;
+ break;
+ case 4:
+ while (tempCOUNT >=3D 33) tempCOUNT -=3D 33;
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D (arg >> 31) & 1;
+ arg =3D 0xFFFFFFFFULL & ((arg << 1) | (cf & 1));
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ of =3D ((arg >> 31) ^ cf) & 1;
+ break;
+ case 2:
+ while (tempCOUNT >=3D 17) tempCOUNT -=3D 17;
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D (arg >> 15) & 1;
+ arg =3D 0xFFFFULL & ((arg << 1) | (cf & 1));
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ of =3D ((arg >> 15) ^ cf) & 1;
+ break;
+ case 1:
+ while (tempCOUNT >=3D 9) tempCOUNT -=3D 9;
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D (arg >> 7) & 1;
+ arg =3D 0xFFULL & ((arg << 1) | (cf & 1));
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ of =3D ((arg >> 7) ^ cf) & 1;
+ break;
+ default:=20
+ vpanic("calculate_RCL(amd64g): invalid size");
+ }
+
+ cf &=3D 1;
+ of &=3D 1;
+ rflags_in &=3D ~(AMD64G_CC_MASK_C | AMD64G_CC_MASK_O);
+ rflags_in |=3D (cf << AMD64G_CC_SHIFT_C) | (of << AMD64G_CC_SHIFT_O);
+
+ return wantRflags ? rflags_in : arg;
+}
+
+
/* CALLED FROM GENERATED CODE */
/* DIRTY HELPER (non-referentially-transparent) */
/* Horrible hack. On non-amd64 platforms, return 1. */
Modified: trunk/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-amd64/toIR.c 2007-01-10 05:22:03 UTC (rev 1724)
+++ trunk/priv/guest-amd64/toIR.c 2007-01-12 20:29:01 UTC (rev 1725)
@@ -3006,7 +3006,7 @@
/* delta on entry points at the modrm byte. */
HChar dis_buf[50];
Int len;
- Bool isShift, isRotate, isRotateRC;
+ Bool isShift, isRotate, isRotateC;
IRType ty =3D szToITy(sz);
IRTemp dst0 =3D newTemp(ty);
IRTemp dst1 =3D newTemp(ty);
@@ -3030,14 +3030,15 @@
isRotate =3D False;
switch (gregLO3ofRM(modrm)) { case 0: case 1: isRotate =3D True; }
=20
- isRotateRC =3D toBool(gregLO3ofRM(modrm) =3D=3D 3);
+ isRotateC =3D False;
+ switch (gregLO3ofRM(modrm)) { case 2: case 3: isRotateC =3D True; }
=20
- if (!isShift && !isRotate && !isRotateRC) {
+ if (!isShift && !isRotate && !isRotateC) {
vex_printf("\ncase %d\n", gregLO3ofRM(modrm));
vpanic("dis_Grp2(Reg): unhandled case(amd64)");
}
=20
- if (isRotateRC) {
+ if (isRotateC) {
/* Call a helper; this insn is so ridiculous it does not deserve
better. One problem is, the helper has to calculate both the
new value and the new flags. This is more than 64 bits, and
@@ -3046,6 +3047,7 @@
using the sign of the sz field to indicate whether it is the
value or rflags result we want.
*/
+ Bool left =3D toBool(gregLO3ofRM(modrm) =3D=3D 2);
IRExpr** argsVALUE;
IRExpr** argsRFLAGS;
=20
@@ -3064,7 +3066,8 @@
mkIRExprCCall(
Ity_I64,=20
0/*regparm*/,=20
- "amd64g_calculate_RCR", &amd64g_calculate_RCR,
+ left ? "amd64g_calculate_RCL" : "amd64g_calculate_RC=
R",
+ left ? &amd64g_calculate_RCL : &amd64g_calculate_RC=
R,
argsVALUE
)
);
@@ -3078,7 +3081,8 @@
mkIRExprCCall(
Ity_I64,=20
0/*regparm*/,=20
- "amd64g_calculate_RCR", &amd64g_calculate_RCR,
+ left ? "amd64g_calculate_RCL" : "amd64g_calculate_RC=
R",
+ left ? &amd64g_calculate_RCL : &amd64g_calculate_RC=
R,
argsRFLAGS
)
);
|
|
From: <sv...@va...> - 2007-01-12 19:21:24
|
Author: sewardj
Date: 2007-01-12 19:21:22 +0000 (Fri, 12 Jan 2007)
New Revision: 6510
Log:
Handle DW_CFA_undefined (produced by PathScale 2.4 on amd64-linux)
Modified:
trunk/coregrind/m_debuginfo/readdwarf.c
Modified: trunk/coregrind/m_debuginfo/readdwarf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/readdwarf.c 2007-01-12 19:03:19 UTC (rev =
6509)
+++ trunk/coregrind/m_debuginfo/readdwarf.c 2007-01-12 19:21:22 UTC (rev =
6510)
@@ -2224,6 +2224,16 @@
ctx->cfa_offset =3D off * ctx->data_a_f;
break;
=20
+ case DW_CFA_undefined:
+ reg =3D read_leb128( &instr[i], &nleb, 0);
+ i +=3D nleb;
+ if (reg < 0 || reg >=3D N_CFI_REGS)=20
+ return 0; /* fail */
+ ctx->reg[reg].tag =3D RR_Undef;
+ ctx->reg[reg].coff =3D 0;
+ ctx->reg[reg].reg =3D 0;
+ break;
+
case DW_CFA_GNU_args_size:
/* No idea what is supposed to happen. gdb-6.3 simply
ignores these. */
|
|
From: <sv...@va...> - 2007-01-12 19:03:21
|
Author: sewardj
Date: 2007-01-12 19:03:19 +0000 (Fri, 12 Jan 2007)
New Revision: 6509
Log:
ML_(read_callframe_info_dwarf2): deal better with CIEs with no
augmentation (has to do with read_encoded_Addr). This "fix" is a
kludge and may be replaced in future by something cleaner. See
extensive comment addition for the whole sorry tale.
Modified:
trunk/coregrind/m_debuginfo/readdwarf.c
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readdwarf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/readdwarf.c 2007-01-11 21:56:20 UTC (rev =
6508)
+++ trunk/coregrind/m_debuginfo/readdwarf.c 2007-01-12 19:03:19 UTC (rev =
6509)
@@ -1420,6 +1420,136 @@
read_encoded_Addr.
*/
=20
+/* More badness re address encoding, 12 Jan 07.
+
+ Most gcc provided CIEs have a "zR" augmentation, which means they
+ supply their own address encoding, and that works fine. However,
+ some icc9 supplied CIEs have no augmentation, which means they use
+ the default_Addr_encoding(). That says to use a machine-word sized
+ value, literally unmodified.
+
+ Since .so's are, in general, relocated when loaded, having absolute
+ addresses in the CFI data makes no sense when read_encoded_Addr is
+ used to find the initial location for a FDE. The resulting saga:
+
+ TomH:
+ > I'm chasing a stack backtrace failure for an amd64 .so which was=20
+ > created I believe by icc 9.1. After a while I wound up looking at
+ > this: (readdwarf.c)
+ >
+ > 5083 tom static UChar default_Addr_encoding ( void )
+ > 3584 tom {
+ > 3584 tom switch (sizeof(Addr)) {
+ > 3584 tom case 4: return DW_EH_PE_udata4;
+ > 3584 tom case 8: return DW_EH_PE_udata8;
+ > 3584 tom default: vg_assert(0);
+ > 3584 tom }
+ > 3584 tom }
+ >
+ > If a CIE does not have an "augmentation string" (typically "zR") th=
en=20
+ > addresses are decoded as described by default_Addr_encoding. If th=
ere
+ > is an 'R' in the augmentation string then the encoding to use=20
+ > is specified by the CIE itself, which works fine with GCC compiled =
code
+ > since that always appears to specify zR.
+
+ Correct.
+
+ > Problem is this .so has no augmentation string and so uses the
+ > default encoding, viz DW_EH_PE_udata8. That appears to mean
+ > "read a 64 bit number" and use that as-is (for the starting value
+ > of the program counter when running the CFA program).
+
+ Strictly speaking the default is DW_EH_PE_absptr, but that amounts
+ to either udata4 or udata8 depending on the platform's pointer size
+ which is a shortcut I used.
+
+ > For this .so that gives nonsense (very small) PCs which are later
+ > rejected by the sanity check which ensures PC ranges fall inside
+ > the mapped text segment. It seems like the .so expects to have the
+ > start VMA of the text segment added on. This would correspond to
+ >
+ > static UChar default_Addr_encoding ( void )
+ > {
+ > switch (sizeof(Addr)) {
+ > case 4: return DW_EH_PE_textrel + DW_EH_PE_udata4;
+ > case 8: return DW_EH_PE_textrel + DW_EH_PE_udata8;
+ > default: vg_assert(0);
+ > }
+ > }
+
+ The problem you're seeing is that you have absolute pointers inside
+ a shared library, which obviously makes little sense on the face of
+ things as how would the linker know where the library will be
+ loaded?
+
+ The answer of course is that it doesn't, so if it points absolute
+ pointers in the frame unwind data is has to include relocations for
+ them, and I'm betting that if you look at the relocations in the
+ library you will there are some for that data.
+
+ That is fine of course when ld.so maps the library - it will
+ relocate the eh_frame data as it maps it (or prelinking will
+ already have done so) and when the g++ exception code kicks in and
+ unwinds the stack it will see relocated data.
+
+ We of course are mapping the section from the ELF file ourselves
+ and are not applying the relocations, hence the problem you are
+ seeing.
+
+ Strictly speaking we should apply the relocations but the cheap
+ solution is essentially to do what you've done - strictly speaking
+ you should adjust by the difference between the address the library
+ was linked for and the address it has been loaded at, but a shared
+ library will normally be linked for address zero I believe. It's
+ possible that prelinking might change that though?
+
+ JRS:
+ That all syncs with what I am seeing.
+
+ So what I am inclined to do is:
+
+ - Leave default_Addr_encoding as it is
+
+ - Change read_encoded_Addr's handling of "case DW_EH_PE_absptr" so
+ it sets base to, as you say, the difference between the address
+ the library was linked for and the address it has been loaded at
+ (=3D=3D the SegInfo's text_bias)
+
+ Does that sound sane? I think it should even handle the prelinked
+ case.
+
+ (JRS, later)
+
+ Hmm. Plausible as it sounds, it doesn't work. It now produces
+ bogus backtraces for locations inside the (statically linked)
+ memcheck executable.
+
+ Besides, there are a couple of other places where read_encoded_Addr
+ is used -- one of which is used to establish the length of the
+ address range covered by the current FDE:
+
+ fde_arange =3D read_encoded_Addr(&nbytes, &adi, data);
+
+ and it doesn't seem to make any sense for read_encoded_Addr to add
+ on the text segment bias in that context. The DWARF3 spec says
+ that both the initial_location and address_range (length) fields
+ are encoded the same way ("target address"), so it is unclear at
+ what stage in the process it would be appropriate to relocate the
+ former but not the latter.
+
+ One unprincipled kludge that does work is the following: just
+ before handing one of the address range fragments off to
+ ML_(addDiCfSI) for permanent storage, check its start address. If
+ that is very low (less than 2 M), and is far below the mapped text
+ segment, and adding the text bias would move the fragment entirely
+ inside the mapped text segment, then do so. A kind of kludged
+ last-minute relocation, if you like.
+
+ 12 Jan 07: committing said kludge (see kludge_then_addDiCfSI). If
+ the situation clarifies, it can easily enough be backed out and
+ replaced by a better fix.
+*/
+
/* --------------- Decls --------------- */
=20
#if defined(VGP_x86_linux)
@@ -2386,6 +2516,65 @@
}
}
=20
+
+/* Attempt to add a CFI record to the collection. Nominally this just
+ hands the record off to ML_(addDiCfSI), which will ignore it if it
+ falls outside the mapped text segment of this SegInfo. However, a
+ nasty kludge may be pre-applied: if the record's base address is
+ very small, and does not come anywhere near the mapped text
+ segment, then assume we forgot to add the text_bias for some
+ reason, so add it on and then try again. */
+static
+void kludge_then_addDiCfSI ( struct _SegInfo* si, DiCfSI* cfsi )
+{
+# define IN_TEXT_SEG(_addr) \
+ ((_addr) >=3D si->text_start_avma \
+ && (_addr) < (si->text_start_avma + si->text_size))
+
+ if ( /* "has implausibly low addr" */
+ cfsi->base < 2 * 1024 * 1024
+ /* "has plausible size" */
+ && cfsi->len > 0
+ && cfsi->len < 50000
+ /* "is well clear of the text segment" */
+ && (2 * (cfsi->base + cfsi->len)) < si->text_start_avma
+ /* "adding text_bias would put the start in the text segment */
+ && IN_TEXT_SEG(si->text_bias + cfsi->base)
+ /* "adding text_bias would put the end in the text segment */
+ && IN_TEXT_SEG(si->text_bias + cfsi->base + cfsi->len - 1)
+ /* XXX and there isn't already a record present */ )=20
+ {
+ static Int complaints =3D 3;
+
+ /* Oh, well, let's kludge it into the text segment, then. */
+ /* First, though, complain: */
+ if (VG_(clo_trace_cfi) || complaints > 0) {
+ complaints--;
+ if (VG_(clo_verbosity) > 1) {
+ VG_(message)(
+ Vg_DebugMsg,
+ "warning: DiCfSI %p .. %p kludge reloc to %p .. %p",
+ cfsi->base,=20
+ cfsi->base + cfsi->len - 1,
+ si->text_bias + cfsi->base,=20
+ si->text_bias + cfsi->base + cfsi->len - 1
+ );
+ }
+ if (VG_(clo_trace_cfi))=20
+ ML_(ppDiCfSI)(cfsi);
+ }
+
+ /* last but not least ... */
+ cfsi->base +=3D si->text_bias;
+ }
+
+ /* finished monkeying around, let's add it. */
+ ML_(addDiCfSI)(si, cfsi);
+
+# undef IN_TEXT_SEG
+}
+
+
/* Run the CF instructions in instrs[0 .. ilen-1], until the end is
reached, or until there is a failure. Return True iff success.=20
*/
@@ -2414,7 +2603,7 @@
if (loc_prev !=3D ctx->loc && si) {
summ_ok =3D summarise_context ( &cfsi, loc_prev, ctx );
if (summ_ok) {
- ML_(addDiCfSI)(si, &cfsi);
+ kludge_then_addDiCfSI(si, &cfsi);
if (VG_(clo_trace_cfi))
ML_(ppDiCfSI)(&cfsi);
}
@@ -2426,7 +2615,7 @@
if (si) {
summ_ok =3D summarise_context ( &cfsi, loc_prev, ctx );
if (summ_ok) {
- ML_(addDiCfSI)(si, &cfsi);
+ kludge_then_addDiCfSI(si, &cfsi);
if (VG_(clo_trace_cfi))
ML_(ppDiCfSI)(&cfsi);
}
Modified: trunk/coregrind/m_debuginfo/readelf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/readelf.c 2007-01-11 21:56:20 UTC (rev 65=
08)
+++ trunk/coregrind/m_debuginfo/readelf.c 2007-01-12 19:03:19 UTC (rev 65=
09)
@@ -987,6 +987,11 @@
=20
si->text_bias =3D offset_oimage;
=20
+ if (VG_(clo_verbosity) > 2 || VG_(clo_trace_redir))
+ VG_(message)(Vg_DebugMsg, " svma %010p, avma %010p",=20
+ si->text_start_avma - si->text_bias,
+ si->text_start_avma );
+
/* If, after looking at all the program headers, we still didn't=20
find a soname, add a fake one. */
if (si->soname =3D=3D NULL) {
|
|
From: Julian S. <js...@ac...> - 2007-01-12 16:56:43
|
(w/ apologies for delayed reply) > I guess my question is: what's the status of "make dist" "make dist" from a subversion tree is definitely maintained, since that's needed to roll the distro tarball. The difficulty is that the xml -> pdf document preparation stage relies on an incredibly fragile toolchain which involves installing zillions of XML-related rpms and tends to break whenever I upgrade my distro. Currently it works OK on SuSE 10.1 although not 10.2, so I keep a 10.1 (virtual) machine around specifically for that purpose. Whether make dist works from a tarball, I have no idea. I doubt it. > and the spec file? That I don't know either. I don't try to build rpms. I did push a fix for it into the 3_2_BRANCH just recently, but didn't test it. If you want to chase it, that would be good. J |
|
From: Tom H. <to...@co...> - 2007-01-12 08:57:59
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
>> Nightly build on dellow ( x86_64, Fedora Core 6 ) started at 2007-01-12
>
>> - A valgrind/memcheck/tests/zeropage.stderr.exp2
>> - A valgrind/memcheck/tests/str_tester.stderr.exp
>> - A valgrind/memcheck/tests/ppc64
>> - A valgrind/memcheck/tests/ppc64/Makefile.am
>> - svn: Malformed network data
>
> Say what?! That's definitely a novel failure mode. Any ideas? svn still
> works fine for me.
It doesn't seem to be doing it now - it must have been a transient
glitch of some sort.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: <js...@ac...> - 2007-01-12 06:55:39
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2007-01-12 09:00:01 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 217 tests, 10 stderr failures, 6 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/round (stdout) none/tests/ppc32/round (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) |
|
From: <js...@ac...> - 2007-01-12 05:04:26
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2007-01-12 04:30:01 GMT Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 250 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 250 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Jan 12 04:48:04 2007 --- new.short Fri Jan 12 05:04:44 2007 *************** *** 10,12 **** ! == 250 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) --- 10,12 ---- ! == 250 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/leak-tree (stderr) *************** *** 18,20 **** none/tests/mremap2 (stdout) - none/tests/pth_detached (stdout) --- 18,19 ---- |
|
From: Tom H. <to...@co...> - 2007-01-12 03:55:29
|
Nightly build on dunsmere ( athlon, Fedora Core 6 ) started at 2007-01-12 03:30:04 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 252 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) |
|
From: Tom H. <th...@cy...> - 2007-01-12 03:35:51
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-01-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 Last 20 lines of verbose log follow echo /tmp/ccCvHybv.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/ccCvHybv.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/ccCvHybv.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/ccCvHybv.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/ccCvHybv.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/ccCvHybv.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/ccCvHybv.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/ccCvHybv.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 rm insn_mmx.c insn_sse2.c insn_fpu.c insn_mmxext.c insn_sse.c insn_sse3.c insn_cmov.c insn_basic.c make[5]: Leaving directory `/tmp/valgrind.32682/valgrind/none/tests/x86' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/valgrind.32682/valgrind/none/tests/x86' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/valgrind.32682/valgrind/none/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/valgrind.32682/valgrind/none' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/valgrind.32682/valgrind' make: *** [check] Error 2 ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Last 20 lines of verbose log follow echo /tmp/cctKsS0R.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cctKsS0R.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cctKsS0R.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cctKsS0R.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cctKsS0R.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cctKsS0R.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cctKsS0R.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' /tmp/cctKsS0R.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 rm insn_mmx.c insn_sse2.c insn_fpu.c insn_mmxext.c insn_sse.c insn_sse3.c insn_cmov.c insn_basic.c make[5]: Leaving directory `/tmp/valgrind.32682/valgrind/none/tests/x86' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/valgrind.32682/valgrind/none/tests/x86' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/valgrind.32682/valgrind/none/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/valgrind.32682/valgrind/none' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/valgrind.32682/valgrind' make: *** [check] Error 2 ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Jan 12 03:25:31 2007 --- new.short Fri Jan 12 03:35:40 2007 *************** *** 7,16 **** Last 20 lines of verbose log follow echo ! /tmp/cctKsS0R.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cctKsS0R.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cctKsS0R.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cctKsS0R.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cctKsS0R.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cctKsS0R.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cctKsS0R.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/cctKsS0R.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 --- 7,16 ---- Last 20 lines of verbose log follow echo ! /tmp/ccCvHybv.s:4393: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/ccCvHybv.s:4513: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/ccCvHybv.s:4633: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/ccCvHybv.s:4753: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/ccCvHybv.s:4873: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/ccCvHybv.s:4993: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/ccCvHybv.s:5113: Error: no such instruction: `fisttpq -56(%ebp)' ! /tmp/ccCvHybv.s:5233: Error: no such instruction: `fisttpq -56(%ebp)' make[5]: *** [insn_sse3.o] Error 1 |
|
From: Tom H. <th...@cy...> - 2007-01-12 03:34:38
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-01-12 03:00:02 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 284 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-01-12 03:29:31
|
Nightly build on lloyd ( x86_64, Fedora Core 3 ) started at 2007-01-12 03:05:04 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 282 tests, 5 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Julian S. <js...@ac...> - 2007-01-12 03:28:15
|
> Nightly build on dellow ( x86_64, Fedora Core 6 ) started at 2007-01-12 > - A valgrind/memcheck/tests/zeropage.stderr.exp2 > - A valgrind/memcheck/tests/str_tester.stderr.exp > - A valgrind/memcheck/tests/ppc64 > - A valgrind/memcheck/tests/ppc64/Makefile.am > - svn: Malformed network data Say what?! That's definitely a novel failure mode. Any ideas? svn still works fine for me. J |
|
From: Tom H. <th...@cy...> - 2007-01-12 03:24:19
|
Nightly build on dellow ( x86_64, Fedora Core 6 ) started at 2007-01-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 == 282 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... failed Last 20 lines of verbose log follow echo A valgrind/memcheck/tests/stack_switch.vgtest A valgrind/memcheck/tests/new_nothrow.stderr.exp A valgrind/memcheck/tests/errs1.vgtest A valgrind/memcheck/tests/deep_templates.cpp A valgrind/memcheck/tests/execve.stderr.exp A valgrind/memcheck/tests/metadata.stderr.exp A valgrind/memcheck/tests/mempool.stderr.exp64 A valgrind/memcheck/tests/partiallydefinedeq.stdout.exp A valgrind/memcheck/tests/leak-0.vgtest A valgrind/memcheck/tests/leak-cycle.vgtest A valgrind/memcheck/tests/realloc2.c A valgrind/memcheck/tests/new_override.stderr.exp A valgrind/memcheck/tests/oset_test.c A valgrind/memcheck/tests/leak-pool-0.vgtest A valgrind/memcheck/tests/wrap5.stderr.exp A valgrind/memcheck/tests/zeropage.stderr.exp2 A valgrind/memcheck/tests/str_tester.stderr.exp A valgrind/memcheck/tests/ppc64 A valgrind/memcheck/tests/ppc64/Makefile.am svn: Malformed network data ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Jan 12 03:10:51 2007 --- new.short Fri Jan 12 03:23:56 2007 *************** *** 1,24 **** ! Checking out valgrind source tree ... failed - Last 20 lines of verbose log follow echo - A valgrind/memcheck/tests/stack_switch.vgtest - A valgrind/memcheck/tests/new_nothrow.stderr.exp - A valgrind/memcheck/tests/errs1.vgtest - A valgrind/memcheck/tests/deep_templates.cpp - A valgrind/memcheck/tests/execve.stderr.exp - A valgrind/memcheck/tests/metadata.stderr.exp - A valgrind/memcheck/tests/mempool.stderr.exp64 - A valgrind/memcheck/tests/partiallydefinedeq.stdout.exp - A valgrind/memcheck/tests/leak-0.vgtest - A valgrind/memcheck/tests/leak-cycle.vgtest - A valgrind/memcheck/tests/realloc2.c - A valgrind/memcheck/tests/new_override.stderr.exp - A valgrind/memcheck/tests/oset_test.c - A valgrind/memcheck/tests/leak-pool-0.vgtest - A valgrind/memcheck/tests/wrap5.stderr.exp - A valgrind/memcheck/tests/zeropage.stderr.exp2 - A valgrind/memcheck/tests/str_tester.stderr.exp - A valgrind/memcheck/tests/ppc64 - A valgrind/memcheck/tests/ppc64/Makefile.am - svn: Malformed network data --- 1,16 ---- ! Checking out valgrind source tree ... done ! Configuring valgrind ... done ! Building valgrind ... done ! Running regression tests ... failed ! ! Regression test results follow ! ! == 282 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == ! memcheck/tests/pointer-trace (stderr) ! memcheck/tests/x86/scalar (stderr) ! memcheck/tests/xml1 (stderr) ! none/tests/mremap (stderr) ! none/tests/mremap2 (stdout) ! none/tests/pth_detached (stdout) |
|
From: <js...@ac...> - 2007-01-12 01:16:24
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-01-12 02:00:01 CET Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 223 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |