public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/29436] New: [gdb/symtab] read.c:2352: internal-error: read_addrmap_from_aranges: Assertion `insertpair.second' failed. Date: Tue, 02 Aug 2022 07:16:33 +0000 [thread overview] Message-ID: <bug-29436-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29436 Bug ID: 29436 Summary: [gdb/symtab] read.c:2352: internal-error: read_addrmap_from_aranges: Assertion `insertpair.second' failed. Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I recently added this assert: ... /* Assume no duplicate offsets in all_comp_units. */ gdb_assert (insertpair.second); ... in read_addrmap_from_aranges, and I was curious if I could trigger it. So I started out with: ... $ gcc ~/hello.c -g -save-temps ... and then manually added this (copied and modified from gdb.dwarf2/clang-debug-names.exp.tcl): ... .ident "GCC: (SUSE Linux) 7.5.0" + .section .debug_names + .4byte .Ldebug_names_end - .Ldebug_names_start + .Ldebug_names_start: + .short 5 /* Header: version */ + .short 0 /* Header: padding */ + .long 2 /* Header: compilation unit count */ + .long 0 /* Header: local type unit count */ + .long 0 /* Header: foreign type unit count */ + .long 0 /* Header: bucket count */ + .long 0 /* Header: name count */ + .long 1 + /* Header: abbreviation table size */ + .long 0 /* Header: augmentation string size */ + .long .Ldebug_info0 /* Compilation unit 0 */ + .long .Ldebug_info0 /* Compilation unit 0 */ + .byte 0 + .p2align 2 + .Ldebug_names_end: + .section .note.GNU-stack,"",@progbits ... in hello.s. [ Actually, I started out with abbreviation table size 0, but gdb doesn't grok it, it always expects a terminating byte. ] This is an empty index, and this bit: ... /* Don't use the index if it's empty. */ if (map->name_count == 0) return false; ... in dwarf2_read_debug_names prevents us from using it, but after disabling it we have indeed: ... $ gdb -q -batch a.out src/gdb/dwarf2/read.c:2352: internal-error: read_addrmap_from_aranges: Assertion `insertpair.second' failed. ... We should handle this in create_cus_from_debug_names_list or some such. Likewise for .gdb_index. Note btw that the standard bit that is violated here is: "For a per-module index, there will be one CU entry for each compile unit in the module". -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-08-02 7:16 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-02 7:16 vries at gcc dot gnu.org [this message] 2022-08-02 7:52 ` [Bug symtab/29436] " vries at gcc dot gnu.org 2022-08-02 7:54 ` vries at gcc dot gnu.org 2022-08-05 11:43 ` vries at gcc dot gnu.org 2022-08-08 8:19 ` vries at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29436-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).