From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 612613858C2D; Wed, 14 Sep 2022 08:46:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 612613858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663145187; bh=K3a1ny2HUNMTYIABIUBvYhRc4+oxyXOlL9QnJoiKUCQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Tz4sYCg5DIM3KruVFM8CYTdFa1gAdQvnjTLUZ07fp8FiTtEyCF20tviaLOLZkZLII JjFCdvM3PIgieJpIxjI8Cz3T/uAfm4k6stbxzBsmgUikOk2IcxvbFiJgZ7DQ5u0Dyj tsySxOmocgqnOoO5vcqhVKmCiKoVU7QopCERpyKM= 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: Wed, 14 Sep 2022 08:46:27 +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: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 13.1 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29453 --- Comment #5 from Tom de Vries --- (In reply to Tom de Vries from comment #2) > (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); > > ... >=20 > Tested this, no regressions. Hmm, I may have forgot to test cc-with-debug-names board: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29572 --=20 You are receiving this mail because: You are on the CC list for the bug.=