This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author corona10
Recipients JelleZijlstra, benjamin.peterson, corona10, remi.lapeyre, serhiy.storchaka, stutzbach, vstinner
Date 2020-05-30.17:16:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590859017.66.0.0262641507265.issue40826@roundup.psfhosted.org>
In-reply-to
Content
FYI this change fix this issue.

--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -1782,7 +1782,11 @@ PyOS_FiniInterrupts(void)
 int
 PyOS_InterruptOccurred(void)
 {
-    PyInterpreterState *interp = _PyInterpreterState_GET();
+    PyThreadState *tstate = _PyThreadState_GET();
+    if (!tstate) {
+        return 0;
+    }
+    PyInterpreterState *interp = tstate->interp;
     if (!_Py_ThreadCanHandleSignals(interp)) {
         return 0;
     }
History
Date User Action Args
2020-05-30 17:16:57corona10setrecipients: + corona10, vstinner, benjamin.peterson, stutzbach, serhiy.storchaka, JelleZijlstra, remi.lapeyre
2020-05-30 17:16:57corona10setmessageid: <1590859017.66.0.0262641507265.issue40826@roundup.psfhosted.org>
2020-05-30 17:16:57corona10linkissue40826 messages
2020-05-30 17:16:57corona10create