diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-01-25 23:36:11 +0100 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-01-25 22:36:11 +0000 |
commit | 1e678aed6cc8f4f77e2485a32c89cc96c4efe8d8 (patch) | |
tree | a3800df00dc292230cbe85bb6e552ce5651a299d /libbacktrace | |
parent | 6da1b88f067b18bd7fad59e643b2fc3747670fbe (diff) | |
download | gcc-1e678aed6cc8f4f77e2485a32c89cc96c4efe8d8.zip gcc-1e678aed6cc8f4f77e2485a32c89cc96c4efe8d8.tar.gz gcc-1e678aed6cc8f4f77e2485a32c89cc96c4efe8d8.tar.bz2 |
re PR other/56076 (Several 64-bit libgo tests FAIL in read_line_header)
PR other/56076
* dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
attribute was not seen.
From-SVN: r195478
Diffstat (limited to 'libbacktrace')
-rw-r--r-- | libbacktrace/ChangeLog | 6 | ||||
-rw-r--r-- | libbacktrace/dwarf.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index 25a56d92..b8755cf 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,9 @@ +2013-01-25 Jakub Jelinek <jakub@redhat.com> + + PR other/56076 + * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir + attribute was not seen. + 2013-01-16 Ian Lance Taylor <iant@google.com> * dwarf.c (struct unit): Add filename and abs_filename fields. diff --git a/libbacktrace/dwarf.c b/libbacktrace/dwarf.c index ce12bdc..3cdbb42 100644 --- a/libbacktrace/dwarf.c +++ b/libbacktrace/dwarf.c @@ -1655,7 +1655,8 @@ read_line_header (struct backtrace_state *state, struct unit *u, strnlen ((const char *) hdr_buf.buf, hdr_buf.left) + 1)) return 0; dir_index = read_uleb128 (&hdr_buf); - if (IS_ABSOLUTE_PATH (filename)) + if (IS_ABSOLUTE_PATH (filename) + || (dir_index == 0 && u->comp_dir == NULL)) hdr->filenames[i] = filename; else { |