From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 64FC03858C50; Thu, 29 Sep 2022 12:07:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64FC03858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664453269; bh=rONXzLPo90nUCZmGSQjUt/Rjq2mhIVSc26IdLtNQcP4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Q2AcD8PCLsSJbDLrtIt+T6w2UZOlQUc7vPWoHkWBUY19yLsCXHktn8l3vuDvk/Rdg JgA//gut8CLdgtmJjxwavECY6NMToUhGensrDYgkS3DF37Q/G0v7QxSCI98BMcBD9a wi0QZVPfje6slL7Nk7R9GfVgpg5yzqQXwFHjUXAw= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/26761] thread.c:95: internal-error: thread_info* inferior_thread(): Assertion `current_thread_ != nullptr' failed Date: Thu, 29 Sep 2022 12:07:46 +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: unknown 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=3D26761 --- Comment #10 from Tom de Vries --- (In reply to Tom de Vries from comment #9) > This seems to fix it: > ... > diff --git a/gdb/thread.c b/gdb/thread.c > index 378c5ee2d13..21d21c9d1c6 100644 > --- a/gdb/thread.c > +++ b/gdb/thread.c > @@ -631,7 +631,8 @@ any_thread_of_inferior (inferior *inf) > gdb_assert (inf->pid !=3D 0); >=20=20 > /* Prefer the current thread, if there's one. */ > - if (inf =3D=3D current_inferior () && inferior_ptid !=3D null_ptid) > + if (inf =3D=3D current_inferior () && inferior_ptid !=3D null_ptid > + && current_thread_ !=3D nullptr) > return inferior_thread (); >=20=20 > for (thread_info *tp : inf->non_exited_threads ()) > ... Full test run on x86_64-linux showed no regressions. --=20 You are receiving this mail because: You are on the CC list for the bug.=