[Bug 239516] readelf -wf segfaults on most (all?) debug info files

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jul 11 18:51:13 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239516

Mark Johnston <markj at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|bugs at FreeBSD.org            |markj at FreeBSD.org
             Status|New                         |In Progress

--- Comment #3 from Mark Johnston <markj at FreeBSD.org> ---
(In reply to Paco Pascal from comment #2)
My apologies for not following up sooner!  I think you indeed found the root
cause, thanks.  Thinking about this some more, I suspect that libdwarf should
be handling this case itself, rather than forcing it into consumers.

I looked at SGI libdwarf, and it appears to handle this:
dwarf_elf_object_access_load_section() looks for a NULL d_buf in the data
descriptor of the target ELF section, which indicates that the section is
SHT_NOBITS.  I proposed a patch here: https://reviews.freebsd.org/D25626

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list