mirror of https://github.com/python/cpython
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:
parent
a4ced86f03
commit
7eab0d000c
|
@ -3090,7 +3090,10 @@ fast_block_end:
|
|||
Python main loop. */
|
||||
PyErr_NormalizeException(
|
||||
&exc, &val, &tb);
|
||||
PyException_SetTraceback(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);
|
||||
|
|
Loading…
Reference in New Issue