mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
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
1 changed files with 4 additions and 1 deletions
|
@ -3090,7 +3090,10 @@ fast_block_end:
|
||||||
Python main loop. */
|
Python main loop. */
|
||||||
PyErr_NormalizeException(
|
PyErr_NormalizeException(
|
||||||
&exc, &val, &tb);
|
&exc, &val, &tb);
|
||||||
|
if (tb != NULL)
|
||||||
PyException_SetTraceback(val, tb);
|
PyException_SetTraceback(val, tb);
|
||||||
|
else
|
||||||
|
PyException_SetTraceback(val, Py_None);
|
||||||
Py_INCREF(exc);
|
Py_INCREF(exc);
|
||||||
tstate->exc_type = exc;
|
tstate->exc_type = exc;
|
||||||
Py_INCREF(val);
|
Py_INCREF(val);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue