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
(11) |
2
(9) |
3
(14) |
4
(18) |
5
(13) |
|
6
(4) |
7
(12) |
8
(16) |
9
(14) |
10
(8) |
11
(9) |
12
(7) |
|
13
(12) |
14
(6) |
15
(14) |
16
(5) |
17
(10) |
18
(8) |
19
(5) |
|
20
(10) |
21
(16) |
22
(5) |
23
(14) |
24
(10) |
25
(11) |
26
(6) |
|
27
(9) |
28
(8) |
29
(11) |
30
(9) |
31
(18) |
|
|
|
From: <sv...@va...> - 2008-01-08 23:59:02
|
Author: sewardj
Date: 2008-01-08 23:59:03 +0000 (Tue, 08 Jan 2008)
New Revision: 7328
Log:
A lot more tidying up. Make x86-linux work again.
Modified:
branches/DATASYMS/coregrind/m_debuginfo/readelf.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-08 17:44:04 UTC (rev 7327)
+++ branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-08 23:59:03 UTC (rev 7328)
@@ -833,16 +833,16 @@
Bool res, ok;
SysRes fd, sres;
Word i;
- OffT offset_oimage = 0;
- Addr dimage = 0;
- UWord n_dimage = 0;
- OffT offset_dimage = 0;
Bool debug = False;
/* Image addresses for the ELF file we're working with. */
Addr oimage = 0;
UWord n_oimage = 0;
+ /* Ditto for any ELF debuginfo file that we might happen to load. */
+ Addr dimage = 0;
+ UWord n_dimage = 0;
+
/* ELF header for the main file. Should == oimage since is at
start of file. */
ElfXX_Ehdr* ehdr_img = NULL;
@@ -1007,9 +1007,8 @@
vg_assert(di->soname == NULL);
{
-//zz Bool offset_set = False;
ElfXX_Addr prev_addr = 0;
- Addr baseaddr = 0;
+ Addr baseaddr = 0;
for (i = 0; i < phdr_nent; i++) {
ElfXX_Phdr* phdr = INDEX_BIS( phdr_img, i, phdr_ent_szB );
@@ -1147,12 +1146,11 @@
/* Find avma-s for: .text .data .bss .plt .got .opd .eh_frame */
- /* Accept .text where mapped as rx */
+ /* Accept .text where mapped as rx (code) */
if (0 == VG_(strcmp)(name, ".text")) {
if (inrx && size > 0 && di->text_size == 0) {
di->text_avma = di->rx_map_avma + foff - di->rx_map_foff;
- di->text_size = //di->rx_map_size; //size;
- size;
+ di->text_size = size;
di->text_bias = VG_PGROUNDDN(di->text_avma) - VG_PGROUNDDN(svma);
if (debug)
VG_(printf)("acquiring .text avma = %p\n", di->text_avma);
@@ -1161,7 +1159,7 @@
}
}
- /* Accept .data where mapped as rw */
+ /* Accept .data where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".data")) {
if (inrw && size > 0 && di->data_size == 0) {
di->data_avma = di->rw_map_avma + foff - di->rw_map_foff;
@@ -1174,7 +1172,7 @@
}
}
- /* Accept .bss where mapped as rw */
+ /* Accept .bss where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".bss")) {
if (inrw && size > 0 && di->bss_size == 0) {
di->bss_avma = di->rw_map_avma + foff - di->rw_map_foff;
@@ -1186,7 +1184,31 @@
}
}
- /* Accept .opd where mapped as rw */
+ /* Accept .got where mapped as rw (data) */
+ if (0 == VG_(strcmp)(name, ".got")) {
+ if (inrw && size > 0 && di->got_size == 0) {
+ di->got_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->got_size = size;
+ if (debug)
+ VG_(printf)("acquiring .got avma = %p\n", di->got_avma);
+ } else {
+ BAD(".got");
+ }
+ }
+
+ /* Accept .plt where mapped as rx (code) */
+ if (0 == VG_(strcmp)(name, ".plt")) {
+ if (inrx && size > 0 && di->plt_size == 0) {
+ di->plt_avma = di->rx_map_avma + foff - di->rx_map_foff;
+ di->plt_size = size;
+ if (debug)
+ VG_(printf)("acquiring .plt avma = %p\n", di->plt_avma);
+ } else {
+ BAD(".plt");
+ }
+ }
+
+ /* Accept .opd where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".opd")) {
if (inrw && size > 0 && di->opd_size == 0) {
di->opd_avma = di->rw_map_avma + foff - di->rw_map_foff;
@@ -1198,10 +1220,10 @@
}
}
- /* Accept .eh_frame where mapped as rx */
+ /* Accept .eh_frame where mapped as rx (code) (?!) */
if (0 == VG_(strcmp)(name, ".eh_frame")) {
if (inrx && size > 0 && di->ehframe_size == 0) {
- di->ehframe_avma = VG_PGROUNDDN(di->rx_map_avma + foff - di->rx_map_foff);
+ di->ehframe_avma = di->rx_map_avma + foff - di->rx_map_foff;
di->ehframe_size = size;
if (debug)
VG_(printf)("acquiring .eh_frame avma = %p\n", di->ehframe_avma);
@@ -1236,13 +1258,14 @@
/* Find interesting sections, read the symbol table(s), read any debug
information */
{
- /* IMAGE addresses: pointers to start of sections (in the
- oimage, not in the running image) -- image addresses */
+ /* IMAGE addresses: pointers to start of sections in the
+ transiently loaded oimage, not in the fragments of the file
+ mapped in by the guest's dynamic linker. */
UChar* strtab_img = NULL; /* .strtab */
ElfXX_Sym* symtab_img = NULL; /* .symtab */
UChar* dynstr_img = NULL; /* .dynstr */
ElfXX_Sym* dynsym_img = NULL; /* .dynsym */
- Char* debuglink_img = NULL; /* .gnu_debuglink */
+ UChar* debuglink_img = NULL; /* .gnu_debuglink */
UChar* stab_img = NULL; /* .stab (stabs) */
UChar* stabstr_img = NULL; /* .stabstr (stabs) */
UChar* debug_line_img = NULL; /* .debug_line (dwarf2) */
@@ -1252,69 +1275,58 @@
UChar* dwarf1d_img = NULL; /* .debug (dwarf1) */
UChar* dwarf1l_img = NULL; /* .line (dwarf1) */
UChar* ehframe_img = NULL; /* .eh_frame (dwarf2) */
- UChar* opd_filea_img = NULL; /* .opd (dwarf2, ppc64-linux) */
- UChar* dummy_filea_img = NULL;
+ UChar* opd_img = NULL; /* .opd (dwarf2, ppc64-linux) */
- OffT symtab_offset = offset_oimage;
- OffT dynsym_offset = offset_oimage;
- OffT debug_offset = offset_oimage;
- OffT opd_offset = offset_oimage;
-
/* Section sizes, in bytes */
- UInt strtab_sz = 0;
- UInt symtab_sz = 0;
- UInt dynstr_sz = 0;
- UInt dynsym_sz = 0;
- UInt debuglink_sz = 0;
- UInt stab_sz = 0;
- UInt stabstr_sz = 0;
- UInt debug_line_sz = 0;
- UInt debug_info_sz = 0;
- UInt debug_abbv_sz = 0;
- UInt debug_str_sz = 0;
- UInt dwarf1d_sz = 0;
- UInt dwarf1l_sz = 0;
- UInt ehframe_sz = 0;
+ SizeT strtab_sz = 0;
+ SizeT symtab_sz = 0;
+ SizeT dynstr_sz = 0;
+ SizeT dynsym_sz = 0;
+ SizeT debuglink_sz = 0;
+ SizeT stab_sz = 0;
+ SizeT stabstr_sz = 0;
+ SizeT debug_line_sz = 0;
+ SizeT debug_info_sz = 0;
+ SizeT debug_abbv_sz = 0;
+ SizeT debug_str_sz = 0;
+ SizeT dwarf1d_sz = 0;
+ SizeT dwarf1l_sz = 0;
+ SizeT ehframe_sz = 0;
- /* Section actual virtual addresses */
- Addr ehframe_avma = 0;
-
/* Find all interesting sections */
/* What FIND does: it finds the section called SEC_NAME. The
- size of it is assigned to SEC_SIZE. The address that it will
- appear in the running image is assigned to SEC_VMA (note,
- this will be meaningless for sections which are not marked
- loadable. Even for sections which are marked loadable, the
+ size of it is assigned to SEC_SIZE. The address of the
+ section in the transiently loaded oimage is assigned to
+ SEC_FILEA. Even for sections which are marked loadable, the
client's ld.so may not have loaded them yet, so there is no
- guarantee that we can safely prod around in any such area)
- The address of the section in the transiently loaded oimage
- is assigned to SEC_FILEA. Because the entire object file is
- transiently mapped aboard for inspection, it's always safe to
- inspect that area. */
+ guarantee that we can safely prod around in any such area).
+ Because the entire object file is transiently mapped aboard
+ for inspection, it's always safe to inspect that area. */
for (i = 0; i < ehdr_img->e_shnum; i++) {
-# define FIND(sec_name, sec_size, sec_filea) \
- if (0 == VG_(strcmp)(sec_name, shdr_strtab_img \
- + shdr_img[i].sh_name)) { \
- Bool nobits; \
- sec_filea = (void*)(oimage + shdr_img[i].sh_offset); \
- sec_size = shdr_img[i].sh_size; \
- nobits = shdr_img[i].sh_type == SHT_NOBITS; \
- TRACE_SYMTAB( "%18s: filea %p .. %p, vma %p .. %p\n", \
- sec_name, (UChar*)sec_filea, \
- ((UChar*)sec_filea) + sec_size - 1); \
- /* SHT_NOBITS sections have zero size in the file. */ \
- if ( shdr_img[i].sh_offset \
- + (nobits ? 0 : sec_size) > n_oimage ) { \
- ML_(symerr)(" section beyond image end?!"); \
- goto out; \
+# define FIND(sec_name, sec_size, sec_img) \
+ do { ElfXX_Shdr* shdr \
+ = INDEX_BIS( shdr_img, i, shdr_ent_szB ); \
+ if (0 == VG_(strcmp)(sec_name, shdr_strtab_img \
+ + shdr->sh_name)) { \
+ Bool nobits; \
+ sec_img = (void*)(oimage + shdr->sh_offset); \
+ sec_size = shdr->sh_size; \
+ nobits = shdr->sh_type == SHT_NOBITS; \
+ TRACE_SYMTAB( "%18s: filea %p .. %p, vma %p .. %p\n", \
+ sec_name, (UChar*)sec_img, \
+ ((UChar*)sec_img) + sec_size - 1); \
+ /* SHT_NOBITS sections have zero size in the file. */ \
+ if ( shdr->sh_offset \
+ + (nobits ? 0 : sec_size) > n_oimage ) { \
+ ML_(symerr)(" section beyond image end?!"); \
+ goto out; \
+ } \
} \
- }
+ } while (0);
- /* Nb: must find where .got and .plt sections will be in the
- * executable image, not in the object image transiently loaded. */
/* NAME SIZE IMAGE addr */
FIND(".dynsym", dynsym_sz, dynsym_img)
FIND(".dynstr", dynstr_sz, dynstr_img)
@@ -1335,10 +1347,6 @@
FIND(".line", dwarf1l_sz, dwarf1l_img)
FIND(".eh_frame", ehframe_sz, ehframe_img)
- FIND(".got", di->got_size, dummy_filea_img)
- FIND(".plt", di->plt_size, dummy_filea_img)
- FIND(".opd", di->opd_size, opd_filea_img)
-
# undef FIND
}
@@ -1354,75 +1362,117 @@
/* See if we can find a matching debug file */
dimage = find_debug_file(di->filename, debuglink_img, crc, &n_dimage);
- if (dimage != 0) {
- ElfXX_Ehdr* ehdr_dimg = (ElfXX_Ehdr*)dimage;
- if (n_dimage >= sizeof(ElfXX_Ehdr)
- && ML_(is_elf_object_file(ehdr_dimg, n_dimage))
- && ehdr_dimg->e_phoff + ehdr_dimg->e_phnum*sizeof(ElfXX_Phdr) <= n_dimage
- && ehdr_dimg->e_shoff + ehdr_dimg->e_shnum*sizeof(ElfXX_Shdr) <= n_dimage)
- {
- Bool need_symtab = (NULL == symtab_img);
- Bool need_stabs = (NULL == stab_img);
- Bool need_dwarf2 = (NULL == debug_info_img);
- Bool need_dwarf1 = (NULL == dwarf1d_img);
- ElfXX_Shdr* shdr;
- UChar* sh_strtab;
+ if (dimage != 0
+ && n_dimage >= sizeof(ElfXX_Ehdr)
+ && ML_(is_elf_object_file)((void*)dimage, n_dimage)) {
- for (i = 0; i < ehdr_dimg->e_phnum; i++) {
- ElfXX_Phdr *o_phdr = &((ElfXX_Phdr *)(dimage + ehdr_dimg->e_phoff))[i];
- if (o_phdr->p_type == PT_LOAD) {
- offset_dimage = di->text_avma - o_phdr->p_vaddr;
- break;
- }
- }
+ /* Pull out and validate program header and section header info */
+ ElfXX_Ehdr* ehdr_dimg = (ElfXX_Ehdr*)dimage;
+ ElfXX_Phdr* phdr_dimg = (ElfXX_Phdr*)( ((UChar*)ehdr_dimg)
+ + ehdr_dimg->e_phoff );
+ UWord phdr_dnent = ehdr_dimg->e_phnum;
+ UWord phdr_dent_szB = ehdr_dimg->e_phentsize;
+ ElfXX_Shdr* shdr_dimg = (ElfXX_Shdr*)( ((UChar*)ehdr_dimg)
+ + ehdr_dimg->e_shoff );
+ UWord shdr_dnent = ehdr_dimg->e_shnum;
+ UWord shdr_dent_szB = ehdr_dimg->e_shentsize;
+ UChar* shdr_strtab_dimg = NULL;
- debug_offset = offset_dimage;
- if (need_symtab)
- symtab_offset = offset_dimage;
+ Bool need_symtab, need_stabs, need_dwarf2, need_dwarf1;
- shdr = (ElfXX_Shdr*)(dimage + ehdr_dimg->e_shoff);
- sh_strtab = (UChar*)(dimage + shdr[ehdr_dimg->e_shstrndx].sh_offset);
+ if (phdr_dnent == 0
+ || !contained_within(
+ dimage, n_dimage,
+ (Addr)phdr_dimg, phdr_dnent * phdr_dent_szB)) {
+ ML_(symerr)("Missing or invalid ELF Program Header Table (debuginfo file)");
+ goto out;
+ }
- /* Same deal as previous FIND, except simpler - doesn't
- look for avma, only oimage address. */
+ if (shdr_dnent == 0
+ || !contained_within(
+ dimage, n_dimage,
+ (Addr)shdr_dimg, shdr_dnent * shdr_dent_szB)) {
+ ML_(symerr)("Missing or invalid ELF Section Header Table (debuginfo file)");
+ goto out;
+ }
- /* Find all interesting sections */
- for (i = 0; i < ehdr_dimg->e_shnum; i++) {
+ /* Also find the section header's string table, and validate. */
+ /* checked previously by is_elf_object_file: */
+ vg_assert( ehdr_dimg->e_shstrndx != SHN_UNDEF );
-# define FIND(condition, sec_name, sec_size, sec_filea) \
+ shdr_strtab_dimg
+ = (UChar*)( ((UChar*)ehdr_dimg)
+ + shdr_dimg[ehdr_dimg->e_shstrndx].sh_offset);
+ if (!contained_within( dimage, n_dimage,
+ (Addr)shdr_strtab_dimg,
+ 1/*bogus, but we don't know the real size*/ )) {
+ ML_(symerr)("Invalid ELF Section Header String Table (debuginfo file)");
+ goto out;
+ }
+
+ need_symtab = (NULL == symtab_img);
+ need_stabs = (NULL == stab_img);
+ need_dwarf2 = (NULL == debug_info_img);
+ need_dwarf1 = (NULL == dwarf1d_img);
+
+ for (i = 0; i < ehdr_dimg->e_phnum; i++) {
+ ElfXX_Phdr* phdr
+ = INDEX_BIS( (void*)(dimage + ehdr_dimg->e_phoff), i, phdr_ent_szB );
+ if (phdr->p_type == PT_LOAD) {
+ //offset_dimage = di->text_avma - phdr->p_vaddr;
+ // FIXME: update di->text_bias at this point?
+ // or can we assume the SVMAs in the debuginfo
+ // file (hence, the biases) are the same as
+ // established from the main file?
+ break;
+ }
+ }
+
+ /* Same deal as previous FIND, except only do it for those
+ sections for which we didn't find anything useful in
+ the main file. */
+
+ /* Find all interesting sections */
+ for (i = 0; i < ehdr_dimg->e_shnum; i++) {
+
+# define FIND(condition, sec_name, sec_size, sec_img) \
+ do { ElfXX_Shdr* shdr \
+ = INDEX_BIS( shdr_dimg, i, shdr_dent_szB ); \
if (condition \
- && 0 == VG_(strcmp)(sec_name, sh_strtab + shdr[i].sh_name)) { \
+ && 0 == VG_(strcmp)(sec_name, \
+ shdr_strtab_dimg + shdr->sh_name)) { \
Bool nobits; \
- if (0 != sec_filea) \
+ if (0 != sec_img) \
VG_(core_panic)("repeated section!\n"); \
- sec_filea = (void*)(dimage + shdr[i].sh_offset); \
- sec_size = shdr[i].sh_size; \
- nobits = shdr[i].sh_type == SHT_NOBITS; \
+ sec_img = (void*)(dimage + shdr->sh_offset); \
+ sec_size = shdr->sh_size; \
+ nobits = shdr->sh_type == SHT_NOBITS; \
TRACE_SYMTAB( "%18s: filea %p .. %p\n", \
- sec_name, (UChar*)sec_filea, \
- ((UChar*)sec_filea) + sec_size - 1); \
+ sec_name, (UChar*)sec_img, \
+ ((UChar*)sec_img) + sec_size - 1); \
/* SHT_NOBITS sections have zero size in the file. */ \
- if ( shdr[i].sh_offset + (nobits ? 0 : sec_size) > n_dimage ) { \
+ if ( shdr->sh_offset \
+ + (nobits ? 0 : sec_size) > n_dimage ) { \
ML_(symerr)(" section beyond image end?!"); \
goto out; \
} \
- }
+ } \
+ } while (0);
- /* ?? NAME SIZE IMAGE addr */
- FIND(need_symtab, ".symtab", symtab_sz, symtab_img)
- FIND(need_symtab, ".strtab", strtab_sz, strtab_img)
- FIND(need_stabs, ".stab", stab_sz, stab_img)
- FIND(need_stabs, ".stabstr", stabstr_sz, stabstr_img)
- FIND(need_dwarf2, ".debug_line", debug_line_sz, debug_line_img)
- FIND(need_dwarf2, ".debug_info", debug_info_sz, debug_info_img)
- FIND(need_dwarf2, ".debug_abbrev", debug_abbv_sz, debug_abbv_img)
- FIND(need_dwarf2, ".debug_str", debug_str_sz, debug_str_img)
- FIND(need_dwarf1, ".debug", dwarf1d_sz, dwarf1d_img)
- FIND(need_dwarf1, ".line", dwarf1l_sz, dwarf1l_img)
+ /* NEEDED? NAME SIZE IMAGE addr */
+ FIND(need_symtab, ".symtab", symtab_sz, symtab_img)
+ FIND(need_symtab, ".strtab", strtab_sz, strtab_img)
+ FIND(need_stabs, ".stab", stab_sz, stab_img)
+ FIND(need_stabs, ".stabstr", stabstr_sz, stabstr_img)
+ FIND(need_dwarf2, ".debug_line", debug_line_sz, debug_line_img)
+ FIND(need_dwarf2, ".debug_info", debug_info_sz, debug_info_img)
+ FIND(need_dwarf2, ".debug_abbrev", debug_abbv_sz, debug_abbv_img)
+ FIND(need_dwarf2, ".debug_str", debug_str_sz, debug_str_img)
+ FIND(need_dwarf1, ".debug", dwarf1d_sz, dwarf1d_img)
+ FIND(need_dwarf1, ".line", dwarf1l_sz, dwarf1l_img)
-# undef FIND
- }
+# undef FIND
}
}
}
@@ -1441,14 +1491,14 @@
read_elf_symtab = read_elf_symtab__normal;
# endif
read_elf_symtab(di, "symbol table",
- symtab_img, symtab_sz, di->text_bias, /*symtab_offset,*/
+ symtab_img, symtab_sz, di->text_bias,
strtab_img, strtab_sz,
- opd_filea_img, opd_offset);
+ opd_img, di->data_bias/*opd_offset*/);
read_elf_symtab(di, "dynamic symbol table",
- dynsym_img, dynsym_sz, di->text_bias, /*dynsym_offset,*/
+ dynsym_img, dynsym_sz, di->text_bias,
dynstr_img, dynstr_sz,
- opd_filea_img, opd_offset);
+ opd_img, di->data_bias/*opd_offset*/);
}
/* Read .eh_frame (call-frame-info) if any */
@@ -1462,7 +1512,7 @@
we ignore it. */
# if !defined(VGP_amd64_linux)
if (stab_img && stabstr_img) {
- ML_(read_debuginfo_stabs) ( di, debug_offset, stab_img, stab_sz,
+ ML_(read_debuginfo_stabs) ( di, di->text_bias, stab_img, stab_sz,
stabstr_img, stabstr_sz );
}
# endif
@@ -1473,7 +1523,7 @@
before using it. */
if (debug_info_img && debug_abbv_img && debug_line_img
/* && debug_str_img */) {
- ML_(read_debuginfo_dwarf2) ( di, di->text_bias, /*debug_offset,*/
+ ML_(read_debuginfo_dwarf2) ( di, di->text_bias,
debug_info_img, debug_info_sz,
debug_abbv_img,
debug_line_img, debug_line_sz,
|
|
From: <sv...@va...> - 2008-01-08 17:44:12
|
Author: tom
Date: 2008-01-08 17:44:04 +0000 (Tue, 08 Jan 2008)
New Revision: 7327
Log:
If we don't find the address in the segInfo list that ask the address
space manager for the name of the file it was mapped from as a fallback
solution.
This allows us to print the names of exe/dll files in the stack trace
when running programs under wine.
Modified:
trunk/coregrind/m_debuginfo/debuginfo.c
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2008-01-08 17:29:02 UTC (rev 7326)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2008-01-08 17:44:04 UTC (rev 7327)
@@ -659,6 +659,8 @@
{
Int used;
SegInfo* si;
+ const NSegment *seg;
+ HChar* filename;
vg_assert(nbuf > 0);
for (si = segInfo_list; si != NULL; si = si->next) {
@@ -680,6 +682,12 @@
return True;
}
}
+ if ((seg = VG_(am_find_nsegment(a))) != NULL &&
+ (filename = VG_(am_get_filename)(seg)) != NULL)
+ {
+ VG_(strncpy_safely)(buf, filename, nbuf);
+ return True;
+ }
return False;
}
|
|
From: <sv...@va...> - 2008-01-08 17:29:00
|
Author: sewardj
Date: 2008-01-08 17:29:02 +0000 (Tue, 08 Jan 2008)
New Revision: 7326
Log:
Fix enough stuff so that simple x86-linux programs Memcheckify OK once
again.
Modified:
branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h
branches/DATASYMS/coregrind/m_debuginfo/readelf.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-01-08 16:48:30 UTC (rev 7325)
+++ branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-01-08 17:29:02 UTC (rev 7326)
@@ -215,8 +215,9 @@
while (True) {
if (curr == NULL)
break;
- if (start+length - 1 < curr->text_avma
- || curr->text_avma + curr->text_size - 1 < start) {
+ if (curr->text_size > 0
+ && (start+length - 1 < curr->text_avma
+ || curr->text_avma + curr->text_size - 1 < start)) {
/* no overlap */
} else {
found = True;
@@ -581,6 +582,7 @@
[a, a+len). */
void VG_(di_notify_munmap)( Addr a, SizeT len )
{
+ if (0) VG_(printf)("DISCARD %p %p\n", a, a+len);
discard_syms_in_range(a, len);
}
Modified: branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h 2008-01-08 16:48:30 UTC (rev 7325)
+++ branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h 2008-01-08 17:29:02 UTC (rev 7326)
@@ -207,7 +207,7 @@
extern void ML_(ppCfiExpr)( XArray* src, Int ix );
-/* --------------------- SEGINFO --------------------- */
+/* --------------------- DEBUGINFO --------------------- */
/* This is the top-level data type. It's a structure which contains
information pertaining to one mapped ELF object. This type is
Modified: branches/DATASYMS/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-08 16:48:30 UTC (rev 7325)
+++ branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-08 17:29:02 UTC (rev 7326)
@@ -837,7 +837,7 @@
Addr dimage = 0;
UWord n_dimage = 0;
OffT offset_dimage = 0;
- Bool debug = 1||False;
+ Bool debug = False;
/* Image addresses for the ELF file we're working with. */
Addr oimage = 0;
@@ -872,6 +872,12 @@
vg_assert(!di->strchunks);
vg_assert(!di->soname);
+ /* If these don't hold true, it means that m_syswrap/m_aspacemgr
+ managed to do a mapping where the start isn't page aligned.
+ Which sounds pretty bogus to me. */
+ vg_assert(VG_IS_PAGE_ALIGNED(di->rx_map_avma));
+ vg_assert(VG_IS_PAGE_ALIGNED(di->rw_map_avma));
+
/* ----------------------------------------------------------
Phase 1. At this point, there is very little information in
the DebugInfo. We only know that something that looks like an
@@ -1139,36 +1145,50 @@
goto out; \
} while (0)
- /* Find avma-s for .text, .data, .opd */
+ /* Find avma-s for: .text .data .bss .plt .got .opd .eh_frame */
- /* Accept .text only when mapped as rx */
+ /* Accept .text where mapped as rx */
if (0 == VG_(strcmp)(name, ".text")) {
- if (inrx /* && !inrw */ && size > 0 && di->text_size == 0) {
+ if (inrx && size > 0 && di->text_size == 0) {
di->text_avma = di->rx_map_avma + foff - di->rx_map_foff;
- di->text_size = size;
- di->text_bias = di->text_avma - svma;
+ di->text_size = //di->rx_map_size; //size;
+ size;
+ di->text_bias = VG_PGROUNDDN(di->text_avma) - VG_PGROUNDDN(svma);
if (debug)
VG_(printf)("acquiring .text avma = %p\n", di->text_avma);
} else {
BAD(".text");
}
- }
+ }
- /* Accept .data only when mapped as rw */
+ /* Accept .data where mapped as rw */
if (0 == VG_(strcmp)(name, ".data")) {
- if (/*!inrx && */ inrw && size > 0 && di->data_size == 0) {
+ if (inrw && size > 0 && di->data_size == 0) {
di->data_avma = di->rw_map_avma + foff - di->rw_map_foff;
di->data_size = size;
+ di->data_bias = di->data_avma - svma;
if (debug)
VG_(printf)("acquiring .data avma = %p\n", di->data_avma);
} else {
BAD(".data");
}
- }
+ }
- /* Accept .opd only when mapped as rw */
+ /* Accept .bss where mapped as rw */
+ if (0 == VG_(strcmp)(name, ".bss")) {
+ if (inrw && size > 0 && di->bss_size == 0) {
+ di->bss_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->bss_size = size;
+ if (debug)
+ VG_(printf)("acquiring .bss avma = %p\n", di->bss_avma);
+ } else {
+ BAD(".bss");
+ }
+ }
+
+ /* Accept .opd where mapped as rw */
if (0 == VG_(strcmp)(name, ".opd")) {
- if (!inrx && inrw && size > 0 && di->opd_size == 0) {
+ if (inrw && size > 0 && di->opd_size == 0) {
di->opd_avma = di->rw_map_avma + foff - di->rw_map_foff;
di->opd_size = size;
if (debug)
@@ -1176,12 +1196,26 @@
} else {
BAD(".opd");
}
- }
+ }
+ /* Accept .eh_frame where mapped as rx */
+ if (0 == VG_(strcmp)(name, ".eh_frame")) {
+ if (inrx && size > 0 && di->ehframe_size == 0) {
+ di->ehframe_avma = VG_PGROUNDDN(di->rx_map_avma + foff - di->rx_map_foff);
+ di->ehframe_size = size;
+ if (debug)
+ VG_(printf)("acquiring .eh_frame avma = %p\n", di->ehframe_avma);
+ } else {
+ BAD(".eh_frame");
+ }
+ }
+
# undef BAD
}
+ if (0) VG_(printf)("YYYY text_: avma %p size %ld bias %p\n",
+ di->text_avma, di->text_size, di->text_bias);
if (VG_(clo_verbosity) > 2 || VG_(clo_trace_redir))
VG_(message)(Vg_DebugMsg, " svma %010p, avma %010p",
@@ -1407,12 +1441,12 @@
read_elf_symtab = read_elf_symtab__normal;
# endif
read_elf_symtab(di, "symbol table",
- symtab_img, symtab_sz, symtab_offset,
+ symtab_img, symtab_sz, di->text_bias, /*symtab_offset,*/
strtab_img, strtab_sz,
opd_filea_img, opd_offset);
read_elf_symtab(di, "dynamic symbol table",
- dynsym_img, dynsym_sz, dynsym_offset,
+ dynsym_img, dynsym_sz, di->text_bias, /*dynsym_offset,*/
dynstr_img, dynstr_sz,
opd_filea_img, opd_offset);
}
@@ -1420,7 +1454,7 @@
/* Read .eh_frame (call-frame-info) if any */
if (ehframe_img) {
ML_(read_callframe_info_dwarf3)
- ( di, ehframe_img, ehframe_sz, ehframe_avma );
+ ( di, ehframe_img, di->ehframe_size, di->ehframe_avma );
}
/* Read the stabs and/or dwarf2 debug information, if any. It
@@ -1439,7 +1473,7 @@
before using it. */
if (debug_info_img && debug_abbv_img && debug_line_img
/* && debug_str_img */) {
- ML_(read_debuginfo_dwarf2) ( di, debug_offset,
+ ML_(read_debuginfo_dwarf2) ( di, di->text_bias, /*debug_offset,*/
debug_info_img, debug_info_sz,
debug_abbv_img,
debug_line_img, debug_line_sz,
|
|
From: Bart V. A. <bar...@gm...> - 2008-01-08 17:27:08
|
The test none/tests/blockfault currently runs successfully on some but not on all architectures. The reason is that the output of this test contains a stack size number. I have updated none/tests/filter_stderr such that this number is removed. Can this patch please be reviewed and applied ? Thanks, Bart. |
|
From: <sv...@va...> - 2008-01-08 16:48:30
|
Author: tom
Date: 2008-01-08 16:48:30 +0000 (Tue, 08 Jan 2008)
New Revision: 7325
Log:
Made the argument to VG_(am_get_filename) const as it doesn't need
to be modified and the routine to find the segment for an address now
returns a const pointer.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/include/pub_tool_aspacemgr.h
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2008-01-08 16:31:25 UTC (rev 7324)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2008-01-08 16:48:30 UTC (rev 7325)
@@ -603,7 +603,7 @@
has one. The returned name's storage cannot be assumed to be
persistent, so the caller should immediately copy the name
elsewhere. */
-HChar* VG_(am_get_filename)( NSegment* seg )
+HChar* VG_(am_get_filename)( NSegment const * seg )
{
Int i;
aspacem_assert(seg);
Modified: trunk/include/pub_tool_aspacemgr.h
===================================================================
--- trunk/include/pub_tool_aspacemgr.h 2008-01-08 16:31:25 UTC (rev 7324)
+++ trunk/include/pub_tool_aspacemgr.h 2008-01-08 16:48:30 UTC (rev 7325)
@@ -137,7 +137,7 @@
extern NSegment const * VG_(am_find_nsegment) ( Addr a );
// See pub_core_aspacemgr.h for description.
-extern HChar* VG_(am_get_filename)( NSegment* );
+extern HChar* VG_(am_get_filename)( NSegment const * );
// See pub_core_aspacemgr.h for description.
extern Bool VG_(am_is_valid_for_client) ( Addr start, SizeT len,
|
|
From: Tom H. <to...@co...> - 2008-01-08 16:32:10
|
In message <478...@cs...>
Russell Sears <se...@cs...> wrote:
>> The wrapper should probably also validate the file descriptor like
>> other wrappers which have file descriptor arguments do.
>
> I couldn't find any wrappers that do anything special with their file
> descriptor arguments. (Look at sys_llseek in syswrap-linux.c, for
> example...)
The llseek wrapper was broken ;-) Now fixed...
> I've attached an updated patch.
Committed.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: <sv...@va...> - 2008-01-08 16:31:22
|
Author: tom
Date: 2008-01-08 16:31:25 +0000 (Tue, 08 Jan 2008)
New Revision: 7324
Log:
Add support for the sync_file_range system call.
Based on patch from Russell Sears <se...@cs...>.
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-linux.h
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2008-01-08 16:10:47 UTC (rev 7323)
+++ trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2008-01-08 16:31:25 UTC (rev 7324)
@@ -220,6 +220,9 @@
DECL_TEMPLATE(linux, sys_rt_sigqueueinfo);
DECL_TEMPLATE(linux, sys_rt_sigsuspend);
+// Linux-specific?
+DECL_TEMPLATE(linux, sys_sync_file_range);
+
/* ---------------------------------------------------------------------
Wrappers for sockets and ipc-ery. These are split into standalone
procedures because x86-linux hides them inside multiplexors
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2008-01-08 16:10:47 UTC (rev 7323)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2008-01-08 16:31:25 UTC (rev 7324)
@@ -1371,6 +1371,12 @@
// LINX_(__NR_unshare, sys_unshare), // 272
LINX_(__NR_set_robust_list, sys_set_robust_list), // 273
LINXY(__NR_get_robust_list, sys_get_robust_list), // 274
+
+// LINX_(__NR_splice, sys_ni_syscall), // 275
+// LINX_(__NR_tee, sys_ni_syscall), // 276
+ LINX_(__NR_sync_file_range, sys_sync_file_range), // 277
+// LINX_(__NR_vmsplice, sys_ni_syscall), // 278
+// LINX_(__NR_move_pages, sys_ni_syscall), // 279
};
const UInt ML_(syscall_table_size) =
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2008-01-08 16:10:47 UTC (rev 7323)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2008-01-08 16:31:25 UTC (rev 7324)
@@ -2118,6 +2118,17 @@
POST_MEM_WRITE( ARG5, sizeof(struct vki_rusage) );
}
+PRE(sys_sync_file_range)
+{
+ PRINT("sys_sync_file_range ( %d, %lld, %lld, %d )",
+ ARG1,ARG2,ARG3,ARG4);
+ PRE_REG_READ4(long, "sync_file_range",
+ int, fd, vki_loff_t, offset, vki_loff_t, nbytes,
+ unsigned int, flags);
+ if (!ML_(fd_allowed)(ARG1, "sync_file_range", tid, False))
+ SET_STATUS_Failure( VKI_EBADF );
+}
+
/* ---------------------------------------------------------------------
utime wrapper
------------------------------------------------------------------ */
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2008-01-08 16:10:47 UTC (rev 7323)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2008-01-08 16:31:25 UTC (rev 7324)
@@ -2216,7 +2216,15 @@
// LINX_(__NR_unshare, sys_unshare), // 310
LINX_(__NR_set_robust_list, sys_set_robust_list), // 311
LINXY(__NR_get_robust_list, sys_get_robust_list), // 312
+// LINX_(__NR_splice, sys_ni_syscall), // 313
+ LINX_(__NR_sync_file_range, sys_sync_file_range), // 314
+// LINX_(__NR_tee, sys_ni_syscall), // 315
+// LINX_(__NR_vmsplice, sys_ni_syscall), // 316
+// LINX_(__NR_move_pages, sys_ni_syscall), // 317
+// LINX_(__NR_getcpu, sys_ni_syscall), // 318
+// LINX_(__NR_epoll_pwait, sys_ni_syscall), // 319
+
LINX_(__NR_utimensat, sys_utimensat), // 320
};
|
|
From: <sv...@va...> - 2008-01-08 16:10:45
|
Author: tom Date: 2008-01-08 16:10:47 +0000 (Tue, 08 Jan 2008) New Revision: 7323 Log: Update linux system call lists based on 2.6.23.1 kernel source. Modified: trunk/include/vki/vki-scnums-amd64-linux.h trunk/include/vki/vki-scnums-ppc32-linux.h trunk/include/vki/vki-scnums-ppc64-linux.h trunk/include/vki/vki-scnums-x86-linux.h Modified: trunk/include/vki/vki-scnums-amd64-linux.h =================================================================== --- trunk/include/vki/vki-scnums-amd64-linux.h 2008-01-08 13:54:43 UTC (rev 7322) +++ trunk/include/vki/vki-scnums-amd64-linux.h 2008-01-08 16:10:47 UTC (rev 7323) @@ -360,6 +360,13 @@ #define __NR_tee 276 #define __NR_sync_file_range 277 #define __NR_vmsplice 278 +#define __NR_move_pages 279 +#define __NR_utimensat 280 +#define __NR_epoll_pwait 281 +#define __NR_signalfd 282 +#define __NR_timerfd 283 +#define __NR_eventfd 284 +#define __NR_fallocate 285 #endif /* __VKI_SCNUMS_AMD64_LINUX_H */ Modified: trunk/include/vki/vki-scnums-ppc32-linux.h =================================================================== --- trunk/include/vki/vki-scnums-ppc32-linux.h 2008-01-08 13:54:43 UTC (rev 7322) +++ trunk/include/vki/vki-scnums-ppc32-linux.h 2008-01-08 16:10:47 UTC (rev 7323) @@ -343,8 +343,17 @@ #define __NR_faccessat 298 #define __NR_get_robust_list 299 #define __NR_set_robust_list 300 +#define __NR_move_pages 301 +#define __NR_getcpu 302 +#define __NR_epoll_pwait 303 +#define __NR_utimensat 304 +#define __NR_signalfd 305 +#define __NR_timerfd 306 +#define __NR_eventfd 307 +#define __NR_sync_file_range2 308 +#define __NR_fallocate 309 -#define __NR_syscalls 301 +#define __NR_syscalls 310 #endif /* __VKI_SCNUMS_PPC32_LINUX_H */ Modified: trunk/include/vki/vki-scnums-ppc64-linux.h =================================================================== --- trunk/include/vki/vki-scnums-ppc64-linux.h 2008-01-08 13:54:43 UTC (rev 7322) +++ trunk/include/vki/vki-scnums-ppc64-linux.h 2008-01-08 16:10:47 UTC (rev 7323) @@ -335,6 +335,15 @@ #define __NR_faccessat 298 #define __NR_get_robust_list 299 #define __NR_set_robust_list 300 +#define __NR_move_pages 301 +#define __NR_getcpu 302 +#define __NR_epoll_pwait 303 +#define __NR_utimensat 304 +#define __NR_signalfd 305 +#define __NR_timerfd 306 +#define __NR_eventfd 307 +#define __NR_sync_file_range2 308 +#define __NR_fallocate 309 #endif /* __VKI_SCNUMS_PPC64_LINUX_H */ Modified: trunk/include/vki/vki-scnums-x86-linux.h =================================================================== --- trunk/include/vki/vki-scnums-x86-linux.h 2008-01-08 13:54:43 UTC (rev 7322) +++ trunk/include/vki/vki-scnums-x86-linux.h 2008-01-08 16:10:47 UTC (rev 7323) @@ -351,7 +351,14 @@ #define __NR_sync_file_range 314 #define __NR_tee 315 #define __NR_vmsplice 316 +#define __NR_move_pages 317 +#define __NR_getcpu 318 +#define __NR_epoll_pwait 319 #define __NR_utimensat 320 +#define __NR_signalfd 321 +#define __NR_timerfd 322 +#define __NR_eventfd 323 +#define __NR_fallocate 324 #endif /* __VKI_SCNUMS_X86_LINUX_H */ |
|
From: Julian S. <js...@ac...> - 2008-01-08 15:58:52
|
Is this worth pushing into 3_3_BRANCH ?
I guess we should start a 3_3_BUGSTATUS.txt file now. Sigh.
J
On Tuesday 08 January 2008 14:54, sv...@va... wrote:
> Author: tom
> Date: 2008-01-08 13:54:43 +0000 (Tue, 08 Jan 2008)
> New Revision: 7322
>
> Log:
> Valid file descriptor argument to llseek system call.
>
> Modified:
> trunk/coregrind/m_syswrap/syswrap-linux.c
>
>
> Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
> ===================================================================
> --- trunk/coregrind/m_syswrap/syswrap-linux.c 2008-01-08 00:36:15 UTC (rev
> 7321) +++ trunk/coregrind/m_syswrap/syswrap-linux.c 2008-01-08 13:54:43 UTC
> (rev 7322) @@ -582,7 +582,10 @@
> unsigned int, fd, unsigned long, offset_high,
> unsigned long, offset_low, vki_loff_t *, result,
> unsigned int, whence);
> - PRE_MEM_WRITE( "llseek(result)", ARG4, sizeof(vki_loff_t));
> + if (!ML_(fd_allowed)(ARG1, "llseek", tid, False))
> + SET_STATUS_Failure( VKI_EBADF );
> + else
> + PRE_MEM_WRITE( "llseek(result)", ARG4, sizeof(vki_loff_t));
> }
> POST(sys_llseek)
> {
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplac
>e _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|
|
From: <sv...@va...> - 2008-01-08 13:54:42
|
Author: tom
Date: 2008-01-08 13:54:43 +0000 (Tue, 08 Jan 2008)
New Revision: 7322
Log:
Valid file descriptor argument to llseek system call.
Modified:
trunk/coregrind/m_syswrap/syswrap-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2008-01-08 00:36:15 UTC (rev 7321)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2008-01-08 13:54:43 UTC (rev 7322)
@@ -582,7 +582,10 @@
unsigned int, fd, unsigned long, offset_high,
unsigned long, offset_low, vki_loff_t *, result,
unsigned int, whence);
- PRE_MEM_WRITE( "llseek(result)", ARG4, sizeof(vki_loff_t));
+ if (!ML_(fd_allowed)(ARG1, "llseek", tid, False))
+ SET_STATUS_Failure( VKI_EBADF );
+ else
+ PRE_MEM_WRITE( "llseek(result)", ARG4, sizeof(vki_loff_t));
}
POST(sys_llseek)
{
|
|
From: Tom H. <th...@cy...> - 2008-01-08 04:04:55
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2008-01-08 03:15:10 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 == 323 tests, 66 stderr failures, 1 stdout failure, 28 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-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/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/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (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) |
|
From: Tom H. <th...@cy...> - 2008-01-08 03:39:11
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2008-01-08 03:05:13 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 == 357 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) |
|
From: Tom H. <th...@cy...> - 2008-01-08 03:27:13
|
Nightly build on dellow ( x86_64, Fedora 8 ) started at 2008-01-08 03:10: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 == 357 tests, 8 stderr failures, 3 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) none/tests/pth_detached (stdout) helgrind/tests/tc18_semabuse (stderr) 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 == 357 tests, 9 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/tc17_sembar (stderr) 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 Jan 8 03:18:26 2008 --- new.short Tue Jan 8 03:27:16 2008 *************** *** 8,10 **** ! == 357 tests, 9 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) --- 8,10 ---- ! == 357 tests, 8 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) *************** *** 16,18 **** none/tests/mremap2 (stdout) ! helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) --- 16,18 ---- none/tests/mremap2 (stdout) ! none/tests/pth_detached (stdout) helgrind/tests/tc18_semabuse (stderr) |
|
From: Tom H. <th...@cy...> - 2008-01-08 03:16:38
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2008-01-08 03:00: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 == 359 tests, 30 stderr failures, 1 stdout failure, 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/blockfault (stderr) none/tests/fdleak_fcntl (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/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) |
|
From: <sv...@va...> - 2008-01-08 00:36:14
|
Author: sewardj
Date: 2008-01-08 00:36:15 +0000 (Tue, 08 Jan 2008)
New Revision: 7321
Log:
ppc64-linux specific followup to r7320.
Modified:
branches/DATASYMS/coregrind/m_debuginfo/readelf.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-08 00:09:03 UTC (rev 7320)
+++ branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-08 00:36:15 UTC (rev 7321)
@@ -237,9 +237,9 @@
if (!plausible
&& ELFXX_ST_TYPE(sym->st_info) == STT_NOTYPE
&& sym->st_size > 0
- && si->opd_start_avma != 0
- && sym_addr >= si->opd_start_avma
- && sym_addr < si->opd_start_avma + si->opd_size)
+ && di->opd_avma != 0
+ && sym_addr >= di->opd_avma
+ && sym_addr < di->opd_avma + di->opd_size)
plausible = True;
# endif
@@ -350,7 +350,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_avma != 0
+ if (di->opd_avma != 0
&& !is_in_opd
&& sym_name[0] == '.') {
vg_assert(!(*from_opd_out));
|
|
From: <sv...@va...> - 2008-01-08 00:09:05
|
Author: sewardj Date: 2008-01-08 00:09:03 +0000 (Tue, 08 Jan 2008) New Revision: 7320 Log: Rename the type SegInfo (which it just isn't) to DebugInfo, a more appropriate name. Also, rename and reorder some fields in DebugInfo. Modified: branches/DATASYMS/callgrind/bb.c branches/DATASYMS/callgrind/debug.c branches/DATASYMS/callgrind/fn.c branches/DATASYMS/callgrind/global.h branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c branches/DATASYMS/coregrind/m_debuginfo/priv_readdwarf.h branches/DATASYMS/coregrind/m_debuginfo/priv_readelf.h branches/DATASYMS/coregrind/m_debuginfo/priv_readstabs.h branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h branches/DATASYMS/coregrind/m_debuginfo/readdwarf.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_redir.c branches/DATASYMS/coregrind/pub_core_redir.h branches/DATASYMS/exp-drd/drd_error.c branches/DATASYMS/exp-drd/drd_error.h branches/DATASYMS/exp-drd/drd_segment.c branches/DATASYMS/include/pub_tool_debuginfo.h [... diff too large to include ...] |