[Python-checkins] r85411 - python/branches/py3k/Python/ceval.c
victor.stinner
python-checkins at python.org
Wed Oct 13 12:48:55 CEST 2010
Author: victor.stinner
Date: Wed Oct 13 12:48:55 2010
New Revision: 85411
Log:
ceval.c: catch recursion error on _PyUnicode_AsString(co->co_filename)
Modified:
python/branches/py3k/Python/ceval.c
Modified: python/branches/py3k/Python/ceval.c
==============================================================================
--- python/branches/py3k/Python/ceval.c (original)
+++ python/branches/py3k/Python/ceval.c Wed Oct 13 12:48:55 2010
@@ -1232,6 +1232,10 @@
PyObject *error_type, *error_value, *error_traceback;
PyErr_Fetch(&error_type, &error_value, &error_traceback);
filename = _PyUnicode_AsString(co->co_filename);
+ if (filename == NULL && tstate->overflowed) {
+ /* maximum recursion depth exceeded */
+ goto exit_eval_frame;
+ }
PyErr_Restore(error_type, error_value, error_traceback);
}
#endif
More information about the Python-checkins
mailing list