Commit a0006457 authored by Victor Stinner's avatar Victor Stinner

ceval.c: catch recursion error on _PyUnicode_AsString(co->co_filename)

parent 80603996
......@@ -1232,6 +1232,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment