This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Avoid segfault on invalid directory table
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 29 Jun 2017 07:23:15 -0400
- Subject: [binutils-gdb] Avoid segfault on invalid directory table
- Authentication-results: sourceware.org; auth=none
*** 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.