➜

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.

作者 vstinner
收信人 koobs, lukasz.langa, pablogsal, pitrou, vstinner
日期 2019-06-04.01:01:52
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1559610112.23.0.552377526305.issue37135@roundup.psfhosted.org>
In-reply-to
内容
> commit 396e0a8d9dc65453cb9d53500d0a620602656cfe (refs/bisect/bad)

Extract of this change:
 
 static inline void
-exit_thread_if_finalizing(_PyRuntimeState *runtime, PyThreadState *tstate)
+exit_thread_if_finalizing(PyThreadState *tstate)
 {
+    _PyRuntimeState *runtime = tstate->interp->runtime;
     /* _Py_Finalizing is protected by the GIL */
     if (runtime->finalizing != NULL && !_Py_CURRENTLY_FINALIZING(runtime, tstate)) {
         drop_gil(&runtime->ceval, tstate);
@@ -236,7 +237,7 @@ PyEval_AcquireLock(void)
         Py_FatalError("PyEval_AcquireLock: current thread state is NULL");
     }
     take_gil(ceval, tstate);
-    exit_thread_if_finalizing(runtime, tstate);
+    exit_thread_if_finalizing(tstate);
 }
 

This change is fine for regular Python threads. But for daemon threads, tstate is likely already corrupted, so it's no longer possible to get interp from interp, and so also not possible to get 'runtime'.
历史
日期 用户 动作 参数
2019-06-04 01:01:52vstinner修改recipients: + vstinner, pitrou, lukasz.langa, koobs, pablogsal
2019-06-04 01:01:52vstinner修改messageid: <1559610112.23.0.552377526305.issue37135@roundup.psfhosted.org>
2019-06-04 01:01:52vstinner链接issue37135 messages
2019-06-04 01:01:52vstinner创建