[PATCH] Avoid segfault on invalid directory table

Padraig Brady pbrady@fb.com
Fri Mar 24 04:09:00 GMT 2017


gdb was segfaulting during backtrace on a binary here,
where fe->dir_index parsed from the dwarf info was seen to
access beyond the provided include_dirs array.
The attached bounds the access to entries actually written to the array,
and was verified to output the backtrace correctly.

cheers,
Pádraig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb-fix-dwarf-include-dirs.patch
Type: text/x-patch
Size: 3389 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20170324/1c24a6ff/attachment.bin>


More information about the Gdb-patches mailing list