From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5B33F3858CDB; Wed, 24 Jan 2024 21:02:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B33F3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706130135; bh=Aan/qAZCzXRa8nIEqIfU6yMc2PjfsPmTMEhX45pPFW4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p90nWta+JuH+gVCF9F1WPldK4hmQckfONmYb2YN5NAIPgWXLBSOmOro0QKYRYfRoc h/NBoMSnfSW85aGpUzIsp4gji/49HqSczQNbjSOFwOvO6ySBY3sg68w0YHvNROF2sL 8FH0TCobs2U1MZ5wItXN6c4kJsnex237f7iipF/M= From: "simark at simark dot ca" 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 21:02:14 +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: simark at simark dot ca 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 #9 from Simon Marchi --- (In reply to Tom de Vries from comment #8) > (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. = But > > the included test case uses a pointer-to-member, which is somewhat rele= vant > > in our case. >=20 > At the parser level (original tree dump file), I see: > ... > ;; Function static intrusive_list_node* intrusive_member_node MemberNode>::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 >=20 >=20 > return =3D NON_LVALUE_EXPR !=3D 0B ? &NON_LVALUE_EXPR > ->D.191606 + (sizetype) 520 : (struct intrusive_list_node *) 520; > ... >=20 > 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 > ... >=20 > The D.191606 bit adds an offset of 8 (this becomes apparent at the expand > rtl 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 > ... I'm not sure I understand, but aren't you conflating thread_info::next with thread_info::resumed_with_pending_wait_status_node::next? --=20 You are receiving this mail because: You are on the CC list for the bug.=