Issue #18408: Fix PyEval_EvalFrameEx() for MemoryError

Don't pass a NULL traceback to PyException_SetTraceback(): pass Py_None.
Passing NULL would raise a new exception.
This commit is contained in:
Victor Stinner 2013-07-15 21:16:27 +02:00
parent a4ced86f03
commit 7eab0d000c
1 changed files with 4 additions and 1 deletions

View File

@ -3090,7 +3090,10 @@ fast_block_end:
Python main loop. */
PyErr_NormalizeException(
&exc, &val, &tb);
if (tb != NULL)
PyException_SetTraceback(val, tb);
else
PyException_SetTraceback(val, Py_None);
Py_INCREF(exc);
tstate->exc_type = exc;
Py_INCREF(val);