From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3265638582B6; Mon, 29 Jan 2024 10:00:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3265638582B6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706522414; bh=qrzTjqp57IhMjqnAmtmeOmbgtXxces/NhFzUpSWMsZs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QCwcePuFNTuOdj+F5yFf5znOUpCXPyAzl8NIDlNRQNJeJlHymWT+3PSh4WXwXdjZE zgORf4C7N9VfpI7F2df4XFANim7wtfepEZ24CnqN48Byg6aJupfEzePNPkgiLE+KSA 6xLj5ziImzfTxNQN2yJ0rVqKpLfQ3D39Q6dVtqIE= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug dap/31306] [gdb/dap] segfault in new_threadstate during gdb.dap/eof.exp Date: Mon, 29 Jan 2024 10:00:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: dap 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=3D31306 --- Comment #1 from Tom de Vries --- Found some related info here: https://docs.python.org/3/c-api/init.html#c.PyGILState_Ensure This fixes it: ... diff --git a/gdb/python/python.c b/gdb/python/python.c index de3a94dfc9a..537db58d8ab 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1048,6 +1048,8 @@ struct gdbpy_event ~gdbpy_event () { + if (_Py_IsFinalizing ()) + return; gdbpy_gil gil; Py_XDECREF (m_func); } ... but I'm not familiar with the code, so this might paper over the problem ra= ther than fix it, I'm not sure. --=20 You are receiving this mail because: You are on the CC list for the bug.=