]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) (GH-20618)
authorVictor Stinner <vstinner@python.org>
Wed, 3 Jun 2020 18:16:39 +0000 (20:16 +0200)
committerGitHub <noreply@github.com>
Wed, 3 Jun 2020 18:16:39 +0000 (20:16 +0200)
commit6d62dc1ea4e191b8486e80a85ca0694215375424
treec8e424712610a6f281e4b566e5e854103eea9ecb
parent5d2396c8cf68fba0a949c6ce474a505e3aba9c1f
[3.9] bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) (GH-20618)

* bpo-40826: Add _Py_EnsureTstateNotNULL() macro (GH-20571)

Add _Py_EnsureTstateNotNULL(tstate) macro: call Py_FatalError() if
tstate is NULL, the error message contains the current function name.

(cherry picked from commit 3026cad59b87751a9215111776cac8e819458fce)

* bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578)

PyOS_InterruptOccurred() now fails with a fatal error if it is called
with the GIL released.

(cherry picked from commit cbe129692293251e7fbcea9ff0d822824d90c140)
Include/internal/pycore_pystate.h
Lib/test/test_capi.py
Misc/NEWS.d/next/C API/2020-06-01-16-12-37.bpo-40826.zQzFoK.rst [new file with mode: 0644]
Modules/signalmodule.c
Python/ceval.c
Python/errors.c
Python/pystate.c
Python/sysmodule.c