This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/21769] New: crash in maint selftest
- From: "tromey at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 13 Jul 2017 12:13:08 +0000
- Subject: [Bug gdb/21769] New: crash in maint selftest
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21769
Bug ID: 21769
Summary: crash in maint selftest
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: tromey at sourceware dot org
Target Milestone: ---
I get a crash in main selftest:
(gdb) maint selftest
During symbol reading, DW_AT_GNU_call_site_target target DIE has invalid low
pc, for referencing DIE 0x2648fee [in module /home/tromey/gdb/build/gdb/gdb].
During symbol reading, cannot get low and high bounds for subprogram DIE at
40144933.
Program received signal SIGSEGV, Segmentation fault.
During symbol reading, incomplete CFI data; unspecified registers (e.g., rax)
at 0x7810f7.
During symbol reading, unsupported tag: 'DW_TAG_unspecified_type'.
During symbol reading, unexpected tag in read_type_die:
'DW_TAG_rvalue_reference_type'.
During symbol reading, No DW_FORM_block* DW_AT_GNU_call_site_value for
DW_TAG_GNU_call_site child DIE 0x200f297 [in module
/home/tromey/gdb/build/gdb/gdb].
During symbol reading, Child DIE 0x200ec01 and its abstract origin 0x20169af
have different parents.
htab_remove_elt_with_hash (htab=htab@entry=0x106f210, element=<optimized out>,
hash=<optimized out>) at ../../binutils-gdb/libiberty/hashtab.c:728
(top-gdb) p slot
$1 = (void **) 0x0
(top-gdb) up
#1 0x0000000000781121 in htab_remove_elt (htab=htab@entry=0x106f210,
element=<optimized out>) at ../../binutils-gdb/libiberty/hashtab.c:714
(top-gdb)
During symbol reading, Multiple children of DIE 0x9baae refer to DIE 0x9c1c3 as
their abstract origin.
#2 0x00000000006742b0 in tdesc_use_registers (gdbarch=gdbarch@entry=0x106d6d0,
target_desc=0xdb4960, early_data=early_data@entry=0x106c2e0) at
../../binutils-gdb/gdb/target-descriptions.c:1328
(top-gdb)
#3 0x000000000042fb8d in i386_gdbarch_init (info=..., arches=<optimized out>)
at ../../binutils-gdb/gdb/i386-tdep.c:8634
(top-gdb)
#4 0x00000000005c4071 in gdbarch_find_by_info (info=...) at
../../binutils-gdb/gdb/gdbarch.c:5394
(top-gdb) down
#3 0x000000000042fb8d in i386_gdbarch_init (info=..., arches=<optimized out>)
at ../../binutils-gdb/gdb/i386-tdep.c:8634
(top-gdb)
#2 0x00000000006742b0 in tdesc_use_registers (gdbarch=gdbarch@entry=0x106d6d0,
target_desc=0xdb4960, early_data=early_data@entry=0x106c2e0) at
../../binutils-gdb/gdb/target-descriptions.c:1328
This patch seems to fix the problem for me, but since I don't know if there's
some underlying issue, and due to lack of time, I'm just going to leave it here
rather than try to submit it.
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 0b5b46f..836e640 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -1325,7 +1325,12 @@ tdesc_use_registers (struct gdbarch *gdbarch,
VEC_iterate (tdesc_arch_reg, data->arch_regs, ixr, arch_reg);
ixr++)
if (arch_reg->reg)
- htab_remove_elt (reg_hash, arch_reg->reg);
+ {
+ void **slot = htab_find_slot (reg_hash, arch_reg->reg, NO_INSERT);
+
+ if (slot != NULL)
+ htab_clear_slot (reg_hash, slot);
+ }
/* Assign numbers to the remaining registers and add them to the
list of registers. The new numbers are always above gdbarch_num_regs.
--
You are receiving this mail because:
You are on the CC list for the bug.