PATCH: Fix seg fault displaying corrupt DWARF information

Nick Clifton nickc@redhat.com
Tue Jan 15 00:36:00 GMT 2008


Hi Guys,

  In the course of some other work I managed to generate a file
  containing a corrupt .debug_info section.  When I ran "readelf -w"
  on it, readelf core dumped.  So I am checking in the attached patch
  to fix the problem, which was the code not checking to see if the
  load/parse of the .debug_info section had succeeded.

Cheers
  Nick

binutils/ChangeLog
2008-01-14  Nick Clifton  <nickc@redhat.com>

	* dwarf.c (process_debug_info): Include the CU offset and corrupt
	version value when reporting unrecognised DWARF version numbers.
	(load_debug_info): Remember a failed attempt to load and parse the
	.debug_info section and do not repeat such attempts.
	(display_debug_lines): Check the return value from load_debug_info
	and return whilst displaying a warning message if the load failed.
	(display_debug_loc): Likewise.
	(display_debug_ranges): Likewise.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwarf.c.patch
Type: text/x-patch
Size: 3660 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20080115/c133bc5f/attachment.bin>


More information about the Binutils mailing list