From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BF4893858C2B; Mon, 27 Feb 2023 23:21:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF4893858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677540083; bh=m38kJY41UxKAmFib9ebHbE64ZZ0bLoRStQGFAoBX/po=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fg2MgkPxmdPcJS7Id2E97TIQyxBDlSuS8dxXPoJsr/jUrJ5iF9ce9lXEVZTNoTO7Y g3+f3RX8aQJQ4V1LGt0cUzoSB3euQFeicXkzxC4nf7CsvnyMvJ4JKd/2iy4JSenEr+ ZgumjmZz/+7O3E9h1+1f6UBZvJSPQVhIK069+mJk= From: "cvs-commit 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: Mon, 27 Feb 2023 23:21:23 +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: cvs-commit 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 #15 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Kevin Buettner : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D522044dc5fa7= 6f9fef70fe746274daf09bbf64fe commit 522044dc5fa76f9fef70fe746274daf09bbf64fe Author: Kevin Buettner Date: Mon Feb 27 16:11:37 2023 -0700 Introduce gdb_exception_forced_quit This commit adds a new exception 'gdb_exception_forced_quit', reason code 'REASON_FORCED_QUIT', return mask 'RETURN_MASK_FORCED_QUIT', and a wrapper for throwing the exception, throw_forced_quit(). The addition of this exception plus supporting code will allow us to recognize that a SIGTERM has been received by GDB and then propagate recognition of that fact to the upper levels of GDB where it can be correctly handled. At the moment, when GDB receives a SIGTERM, it will attempt to exit via a series of calls from the QUIT checking code. However, before it can exit, it must do various cleanups, such as killing or detaching all inferiors. Should these cleanups be attempted while GDB is executing very low level code, such as reading target memory from within ps_xfer_memory(), it can happen that some of GDB's state is out of sync with regard to the cleanup code's expectations. In the case just mentioned, it's been observed that inferior_ptid and the current_thread_ are not in sync; this triggers an assert / internal error. This commit only introduces the exception plus supporting machinery; changes which use this new exception are in later commits in this series. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D26761 Tested-by: Tom de Vries Approved-by: Pedro Alves --=20 You are receiving this mail because: You are on the CC list for the bug.=