It is highly unlikely dwarf_formudata fails because we setup the attribute
ourselves, but better to explicitly mark diridx as bad if it does.
Signed-off-by: Mark Wielaard
---
libdw/ChangeLog | 5 +
libdw/dwarf_getsrclines.c | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-
We would print a "fake" .debug_addr header, but didn't always setup the
unit_length (in case there was a mix of GNU DebugFission and DWARF5 tables).
Make sure to always set the unit_length (we do always calculate the next
unit offset already).
Signed-off-by: Mark Wielaard
---
src/ChangeLog | 5 +
When printing the GNU DebugFission location entries we want to print the
start idx as begin, if we cannot find the address index.
A copy/paste error set up end instead of begin in that case causing us
to print garbage (in the unlikely event the .debug_addr table wasn't
found for this entry).
Signe
In the unlikely case that __libdw_findcu fails to find the associated
CU we would leak one arange because it wasn't linked into the arangelist
list yet. Make sure to free it immediately.
Signed-off-by: Mark Wielaard
---
libdw/ChangeLog | 5 +
libdw/dwarf_getaranges.c | 7 ++-
2
If there were more than 256 directories in the table and there was
illegal DWARF before we read them all, then we might not free the
dirarray (or the wrong one). Fix by defining the dirarray early
(before the first data sanity check) and making sure it is not
(still) equal to dirstack before freein
In both handle_sysv_hash and handle_sysv_hash64 we check the has chain
isn't too long. If it is we would report an error and leak the lengths
array. Just clean up the array even in the error case.
Signed-off-by: Mark Wielaard
---
src/ChangeLog | 6 ++
src/readelf.c | 14 --
2 fi
The MAX_BUILD_ID_BYTES is fairly large (64), while normally build-ids
are only 20 bytes long. But if we would encounter a jumbo build-id we
should have enough room to construct the full build-id path.
We used to substract 2 bytes from the max, because 2 chars are used
as subdir. But that should be
The vendor array should have room for all vendor opcode, including
DW_MACRO_hi_user if used.
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/ChangeLog
index cc12d83..c376a5b 100644
-
On Mon, 2018-06-04 at 16:16 +, Sasha Da Rocha Pinheiro wrote:
> We had a case where dwarf_next_cfi returns -1 but the offset does not
> update, as we should expect by the comment:
>
> 330 On errors, returns -1. Some format errors will permit safely
> 331 skipping to the next CFI entry