From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C8000385694D; Sun, 7 Aug 2022 08:01:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8000385694D From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/29453] [gdb/symtab] read.h:309: internal-error: set_length: Assertion `m_length == length' failed Date: Sun, 07 Aug 2022 08:01:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2022 08:01:25 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29453 --- Comment #2 from Tom de Vries --- (In reply to Tom de Vries from comment #1) > A simple fix is, don't calculate length based on the CU list: > ... > diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c > index c65a8831bcb..7253c7c0d3e 100644 > --- a/gdb/dwarf2/read.c > +++ b/gdb/dwarf2/read.c > @@ -4677,7 +4677,7 @@ create_cus_from_debug_names_list (dwarf2_per_bfd > *per_bf > d, > " ignoring .debug_names.")); > return false; > } > - const ULONGEST length =3D sect_off_next - sect_off_prev; > + const ULONGEST length =3D 0; > dwarf2_per_cu_data_up per_cu > =3D create_cu_from_index_list (per_bfd, §ion, is_dwz, > sect_off_prev, length); > ... Tested this, no regressions. --=20 You are receiving this mail because: You are on the CC list for the bug.=