summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-03 18:16:39 (GMT)
committerGitHub <noreply@github.com>2020-06-03 18:16:39 (GMT)
commit6d62dc1ea4e191b8486e80a85ca0694215375424 (patch)
treec8e424712610a6f281e4b566e5e854103eea9ecb /Python/sysmodule.c
parent5d2396c8cf68fba0a949c6ce474a505e3aba9c1f (diff)
downloadcpython-6d62dc1ea4e191b8486e80a85ca0694215375424.zip
cpython-6d62dc1ea4e191b8486e80a85ca0694215375424.tar.gz
cpython-6d62dc1ea4e191b8486e80a85ca0694215375424.tar.bz2
[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)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 914beb7..e3fe143 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -457,7 +457,7 @@ static PyObject *
sys_audit(PyObject *self, PyObject *const *args, Py_ssize_t argc)
{
PyThreadState *tstate = _PyThreadState_GET();
- assert(tstate != NULL);
+ _Py_EnsureTstateNotNULL(tstate);
if (argc == 0) {
_PyErr_SetString(tstate, PyExc_TypeError,