diff options
author | Pádraig Brady <pbrady@fb.com> | 2017-03-24 15:12:53 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-03-24 15:12:53 +0000 |
commit | 568c1b9f503649d19ed1d17e6970f212e6b6317d (patch) | |
tree | 12bfe74915f7385d4ae89a1404e9e12fcc7ed9c9 /gdb/ChangeLog | |
parent | 62785b09987359ede74a98fac11343827f7181af (diff) | |
download | gdb-568c1b9f503649d19ed1d17e6970f212e6b6317d.zip gdb-568c1b9f503649d19ed1d17e6970f212e6b6317d.tar.gz gdb-568c1b9f503649d19ed1d17e6970f212e6b6317d.tar.bz2 |
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.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5ad7ac3..dd12d3c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2017-03-24 Pádraig Brady <pbrady@fb.com> + + * 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. + 2017-03-23 Simon Marchi <simon.marchi@ericsson.com> * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore |