take_ownership
may erroneously clear MemoryError exceptions
#131173
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
take_ownership
clears any MemoryError exceptions when getting the previous frame fails (even if they were not raised by the call to _PyFrame_GetFrameObject):cpython/Python/frame.c
Lines 74 to 79 in 1e4a434
I think we should save and restore the exception around the call to
_PyFrame_GetFrameObject(prev)
. Something like:CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
No response
The text was updated successfully, but these errors were encountered: