From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 541BD3858404; Thu, 29 Sep 2022 10:02:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 541BD3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664445779; bh=79GeyKbBFCx8Du9AcXaFl+dgY/lrTHvZ7dETO4PgPMI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gKZ1gdcEdPZLDKZ2tY++LC57HLAhOuhiN1IDQZKK4Rj/rMXmBfjsm6E+IEKr8ZN/+ HIar1RGqRopNxyCNIMNWbQ1bltTEHMCIpc9CS2nj99C3/MdTZwFHqH+s9Zu6abwaht T7uKIWvSzoZp5gpEbnRLL4dOp4fThVGsDCH1JUQQ= 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 10:02:58 +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 #9 from Tom de Vries --- 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); /* 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 (); for (thread_info *tp : inf->non_exited_threads ()) ... --=20 You are receiving this mail because: You are on the CC list for the bug.=