From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 16B83385E02C; Wed, 24 Jan 2024 19:41:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16B83385E02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706125283; bh=XVBjg6b+Z3SUV7Qs+AuBMH2fUKFnnyPNO/+QOeM3uXw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v+UTDlaCwCOqu1d9/2rjKmRQvfKwEDNRHwc8TwcCb6SaU8dcWJSbaNYaBErY15wAa 7Gk7vslF7DnOQDl6ymwFRQAZ8npy4X37qSsfGFM3DqSqm+N798G3egUFKxTaHd3NCs yAw671x/QlSbvrHD5Ldzq9C4Y/FDz2HjumHYt1T8= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/31281] [gdb] intrusive_list.h:329: internal-error: push_back: Assertion elem_node->prev == INTRUSIVE_LIST_UNLINKED_VALUE failed. Date: Wed, 24 Jan 2024 19:41:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31281 --- Comment #8 from Tom de Vries --- (In reply to Simon Marchi from comment #6) > I bisected gcc, the failure appeared with this commit: >=20 > c++: non-dependent .* operand folding [PR112427] > https://gitlab.com/gnutools/gcc/-/commit/d3f48f68227 >=20 > I know nothing about compilers, so I don't know what the code changes. B= ut > the included test case uses a pointer-to-member, which is somewhat releva= nt > in our case. At the parser level (original tree dump file), I see: ... ;; Function static intrusive_list_node* intrusive_member_node::as_node(T*) [with T =3D thread_info; intrusive_list_node T:= :* MemberNode =3D &thread_info::resumed_with_pending_wait_status_node] (null) ;; enabled by -tree-original return =3D NON_LVALUE_EXPR !=3D 0B ? &NON_LVALUE_EXPR ->D.191606 + (sizetype) 520 : (struct intrusive_list_node *) 520; ... The 520 is the offset of resumed_with_pending_wait_status_node: ... (gdb) p /x (void *)&thread->resumed_with_pending_wait_status_node - (void *)thread $46 =3D 0x208 (gdb) p 0x208 $12 =3D 520 ... The D.191606 bit adds an offset of 8 (this becomes apparent at the expand r= tl dump file). That also happens to be the offset of the inherited intrusive = list node, see: ... class thread_info : public refcounted_object, public intrusive_list_node ... and: ... (gdb) p (void *) &thread.next - (void *) thread $13 =3D 8 ... --=20 You are receiving this mail because: You are on the CC list for the bug.=