Message363520
| Author |
vstinner |
| Recipients |
eric.snow, nanjekyejoannah, ncoghlan, pablogsal, vstinner |
| Date |
2020年03月06日.14:53:16 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1583506396.46.0.676310852477.issue39877@roundup.psfhosted.org> |
| In-reply-to |
| Content |
Patch to get a cleaner error if the bug occurs, but also to make the bug more reliable:
diff --git a/Python/ceval.c b/Python/ceval.c
index ef4aac2f9a..8bf1e4766d 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -382,7 +382,8 @@ PyEval_SaveThread(void)
void
PyEval_RestoreThread(PyThreadState *tstate)
{
- assert(tstate != NULL);
+ assert(!_PyMem_IsPtrFreed(tstate));
+ assert(!_PyMem_IsPtrFreed(tstate->interp));
_PyRuntimeState *runtime = tstate->interp->runtime;
struct _ceval_runtime_state *ceval = &runtime->ceval; |
|