This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Avoid segfault on invalid directory table


*** TEST RESULTS FOR COMMIT 568c1b9f503649d19ed1d17e6970f212e6b6317d ***

Author: Pdraig Brady <pbrady@fb.com>
Branch: master
Commit: 568c1b9f503649d19ed1d17e6970f212e6b6317d

Avoid segfault on invalid directory table

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.

This commit bounds the access to entries actually written to the
array, and was verified to output the backtrace correctly.

gdb/ChangeLog:

	* dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
	reference beyond the 'lh->include_dirs' array before accessing to
	it.
	(psymtab_include_file_name): Likewise.
	(dwarf_decode_lines_1): Likewise.
	(dwarf_decode_lines): Likewise.
	(file_file_name): Likewise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]