summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-03-12 16:49:23 (GMT)
committerCollin Winter <collinw@gmail.com>2007-03-12 16:49:23 (GMT)
commite19d7a3c0ac25680d2f72669f1441dadbb2f9a41 (patch)
tree85bd8be0b7673cd915fad4c782a5d3305062b77c /Python/pystate.c
parent1817f096f4153293abe7ffb6eda47be3f809fa77 (diff)
downloadcpython-e19d7a3c0ac25680d2f72669f1441dadbb2f9a41.zip
cpython-e19d7a3c0ac25680d2f72669f1441dadbb2f9a41.tar.gz
cpython-e19d7a3c0ac25680d2f72669f1441dadbb2f9a41.tar.bz2
Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167.
Backported from r54291.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index cc25e3e..086789d 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -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);
}