diff options
-rw-r--r-- | Modules/_testcapimodule.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index ba81f71..e1dc5f4 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -2011,7 +2011,11 @@ static PyObject * crash_no_current_thread(PyObject *self) { Py_BEGIN_ALLOW_THREADS - PyErr_SetString(PyExc_SystemError, "bork bork bork"); + /* Using PyThreadState_Get() directly allows the test to pass in + !pydebug mode. However, the test only actually tests anything + in pydebug mode, since that's where the infinite loop was in + the first place. */ + PyThreadState_Get(); Py_END_ALLOW_THREADS return NULL; } |