Re: dwarf_begin_elf() won't create handle without .debug_* sections

2018-05-30 Thread Sasha Da Rocha Pinheiro
I certainly could help with the testing, but I would need help on them, to figure all cases we would cover. I just fixed something interesting in Dyninst. We were assuming that the FDEs were following the CIE in the eh_frame section, but this is not correct. I found them mixed in an ARM binary

[PATCH] libdw: Fix overflow warning on 32bit systems with GCC8 in dwarf_getsrclines.

2018-05-30 Thread Mark Wielaard
ndirs is read from the debug data and should be size checked before use. https://sourceware.org/bugzilla/show_bug.cgi?id=23248 Signed-off-by: Mark Wielaard --- libdw/ChangeLog | 5 + libdw/dwarf_getsrclines.c | 6 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] libdw: Fix memory corruption in libdw_find_split_unit.

2018-05-30 Thread Mark Wielaard
On Mon, 2018-05-28 at 17:33 +0200, Mark Wielaard wrote: > Found by valgrind when trying to match a split unit from a .dwo file > that doesn't contain the split unit (as first) match. We would close > the split Dwarf too early, before we had inspected all units in it. > > Add a testcase that simula

[Bug tools/23248] armv7l: dwarf_getsrclines.c:362:37: error: argument 1 value '4294967288' exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=]

2018-05-30 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=23248 --- Comment #3 from Mark Wielaard --- Martin pointed out that only works (on 64bit) if ndirlist was actually a size_t (like nfilelist already is). So the full patch would be: diff --git a/libdw/dwarf_getsrclines.c b/libdw/dwarf_getsrclines.c

[Bug tools/23248] armv7l: dwarf_getsrclines.c:362:37: error: argument 1 value '4294967288' exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=]

2018-05-30 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=23248 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #2

[Bug tools/23248] armv7l: dwarf_getsrclines.c:362:37: error: argument 1 value '4294967288' exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=]

2018-05-30 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=23248 --- Comment #1 from Martin Liska --- The same happens on i586, after lunch I'll isolate that. -- You are receiving this mail because: You are on the CC list for the bug.

Re: [PATCH] Prepare for 0.171.

2018-05-30 Thread Martin Liška
On 05/30/2018 02:07 AM, Mark Wielaard wrote: > Please give feedback if you find some time to try it out. And I see a new warning with GCC 8 on arm target: https://sourceware.org/bugzilla/show_bug.cgi?id=23248 Martin

Re: [PATCH] readelf: Handle .debug_str_offsets.

2018-05-30 Thread Mark Wielaard
On Mon, 2018-05-28 at 17:03 +0200, Mark Wielaard wrote: > The .debug_str_offsets tables are indirect string offsets into the > .debug_str section. For DWARF5 they can be in both the main, skeleton > and split dwarf (.dwo) files. > > For DWARF4 with the GNU DebugFission extension the tables will no

[Bug tools/23248] New: armv7l: dwarf_getsrclines.c:362:37: error: argument 1 value '4294967288' exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=]

2018-05-30 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=23248 Bug ID: 23248 Summary: armv7l: dwarf_getsrclines.c:362:37: error: argument 1 value '4294967288' exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=] P

Re: [PATCH] readelf handle .debug_addr section.

2018-05-30 Thread Mark Wielaard
On Mon, 2018-05-28 at 16:32 +0200, Mark Wielaard wrote: > Add debug-dump=addr which will show the .debug_addr section tables. > The only tricky bit is the fact that GNU DebugFission, a DWARF4 > extension, didn't produce unit table headers. So if we see a mixed > DWARF4/5 .debug_addr table we have t

[Bug tools/23247] Segfault in 0.171 RC1 release candidate

2018-05-30 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=23247 --- Comment #3 from Martin Liska --- (In reply to Mark Wielaard from comment #1) > Thanks, for some reason we used the wrong listptr for locview attributes. > This fixes it: > > diff --git a/src/readelf.c b/src/readelf.c > index 2ccbea5..6f2f

[PATCH] readelf: Use correct listptr when looking up next loc for locview attr.

2018-05-30 Thread Mark Wielaard
We were using loclistsptr instead of locsptr in print_debug_loc_section. https://sourceware.org/bugzilla/show_bug.cgi?id=23247 Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/readelf.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/Change

[Bug tools/23247] Segfault in 0.171 RC1 release candidate

2018-05-30 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=23247 --- Comment #2 from Mark Wielaard --- (In reply to Mark Wielaard from comment #1) > While looking at this I also noticed that for this test file eu-readelf > --debug-dump=ranges claims to find some unused garbage in .debug_ranges, > which migh

[Bug tools/23247] Segfault in 0.171 RC1 release candidate

2018-05-30 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=23247 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

Re: [PATCH] Prepare for 0.171.

2018-05-30 Thread Martin Liška
On 05/30/2018 02:07 AM, Mark Wielaard wrote: > Please give feedback if you find some time to try it out. Thanks Mark for the RC. I see: https://sourceware.org/bugzilla/show_bug.cgi?id=23247 Martin

[Bug tools/23247] New: Segfault in 0.171 RC1 release candidate

2018-05-30 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=23247 Bug ID: 23247 Summary: Segfault in 0.171 RC1 release candidate Product: elfutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Compon