mirror of
https://github.com/python/cpython.git
synced 2025-08-19 16:20:59 +00:00
Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167.
Backported from r54291.
This commit is contained in:
parent
1817f096f4
commit
e19d7a3c0a
7 changed files with 64 additions and 2 deletions
|
@ -68,6 +68,7 @@ PyInterpreterState_New(void)
|
|||
Py_FatalError("Can't initialize threads for interpreter");
|
||||
#endif
|
||||
interp->modules = NULL;
|
||||
interp->modules_reloading = NULL;
|
||||
interp->sysdict = NULL;
|
||||
interp->builtins = NULL;
|
||||
interp->tstate_head = NULL;
|
||||
|
@ -107,6 +108,7 @@ PyInterpreterState_Clear(PyInterpreterState *interp)
|
|||
Py_CLEAR(interp->codec_search_cache);
|
||||
Py_CLEAR(interp->codec_error_registry);
|
||||
Py_CLEAR(interp->modules);
|
||||
Py_CLEAR(interp->modules_reloading);
|
||||
Py_CLEAR(interp->sysdict);
|
||||
Py_CLEAR(interp->builtins);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue