Hi,
probably obvious, easy to debug with [patch 3/3] applied.
Thanks,
Jan
--- Begin Message ---
libdw/
2014-02-22 Jan Kratochvil <[email protected]>
Fix abort() on missing section headers.
* dwarf_begin_elf.c (check_section): Replace abort call by a return;
Signed-off-by: Jan Kratochvil <[email protected]>
---
libdw/dwarf_begin_elf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
index 6cf3aa1..b3a9dde 100644
--- a/libdw/dwarf_begin_elf.c
+++ b/libdw/dwarf_begin_elf.c
@@ -187,9 +187,9 @@ check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn
*scn, bool inscngrp)
/* Get the section header data. */
shdr = gelf_getshdr (scn, &shdr_mem);
if (shdr == NULL)
- /* This should never happen. If it does something is
- wrong in the libelf library. */
- abort ();
+ /* We may read /proc/PID/mem with only program headers mapped and section
+ headers out of the mapped pages. */
+ return result;
/* Ignore any SHT_NOBITS sections. Debugging sections should not
have been stripped, but in case of a corrupt file we won't try
--
1.8.5.3
--- End Message ---