|
|
f9426a |
http://sourceware.org/ml/gdb-patches/2014-02/msg00731.html
|
|
|
f9426a |
Subject: [patch] gdb_assert -> complaint for weird DWARF
|
|
|
f9426a |
|
|
|
f9426a |
|
|
|
f9426a |
--6TrnltStXW4iwmi0
|
|
|
f9426a |
Content-Type: text/plain; charset=us-ascii
|
|
|
f9426a |
Content-Disposition: inline
|
|
|
f9426a |
|
|
|
f9426a |
Hi,
|
|
|
f9426a |
|
|
|
f9426a |
PR 16581:
|
|
|
f9426a |
GDB crash on inherit_abstract_dies infinite recursion
|
|
|
f9426a |
https://sourceware.org/bugzilla/show_bug.cgi?id=16581
|
|
|
f9426a |
|
|
|
f9426a |
fixed crash from an infinite recursion. But in rare cases the new code can
|
|
|
f9426a |
now gdb_assert() due to weird DWARF file.
|
|
|
f9426a |
|
|
|
f9426a |
I do not yet fully understand why the DWARF is as it is but just GDB should
|
|
|
f9426a |
never crash due to invalid DWARF anyway. The "invalid" DWARF I see only in
|
|
|
f9426a |
Fedora GCC build, not in FSF GCC build, more info at:
|
|
|
f9426a |
https://bugzilla.redhat.com/show_bug.cgi?id=1069382
|
|
|
f9426a |
http://people.redhat.com/jkratoch/gcc-debuginfo-4.8.2-7.fc20.x86_64-gnatbind.debug
|
|
|
f9426a |
|
|
|
f9426a |
|
|
|
f9426a |
Thanks,
|
|
|
f9426a |
Jan
|
|
|
f9426a |
|
|
|
f9426a |
--6TrnltStXW4iwmi0
|
|
|
f9426a |
Content-Type: text/plain; charset=us-ascii
|
|
|
f9426a |
Content-Disposition: inline; filename="complaint.patch"
|
|
|
f9426a |
|
|
|
f9426a |
gdb/
|
|
|
f9426a |
2014-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
f9426a |
|
|
|
f9426a |
* dwarf2read.c (process_die): Change gdb_assert to complaint.
|
|
|
f9426a |
|
|
|
f9426a |
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
|
|
f9426a |
index 3eaa0b1..71f5d34 100644
|
|
|
f9426a |
--- a/gdb/dwarf2read.c
|
|
|
f9426a |
+++ b/gdb/dwarf2read.c
|
|
|
f9426a |
@@ -8029,7 +8029,13 @@ process_die (struct die_info *die, struct dwarf2_cu *cu)
|
|
|
f9426a |
struct cleanup *in_process;
|
|
|
f9426a |
|
|
|
f9426a |
/* We should only be processing those not already in process. */
|
|
|
f9426a |
- gdb_assert (!die->in_process);
|
|
|
f9426a |
+ if (die->in_process)
|
|
|
f9426a |
+ {
|
|
|
f9426a |
+ complaint (&symfile_complaints,
|
|
|
f9426a |
+ _("DIE at 0x%x attempted to be processed twice"),
|
|
|
f9426a |
+ die->offset.sect_off);
|
|
|
f9426a |
+ return;
|
|
|
f9426a |
+ }
|
|
|
f9426a |
|
|
|
f9426a |
die->in_process = 1;
|
|
|
f9426a |
in_process = make_cleanup (reset_die_in_process,die);
|
|
|
f9426a |
|
|
|
f9426a |
--6TrnltStXW4iwmi0--
|
|
|
f9426a |
|