Open
Description
Bug report
Bug description:
Currently in WITH_EXCEPT_START
the interpreter loop gets the traceback from the exception object and then immediately decref's it before calling the __exit__
function. But the __exit__
function may not incref the traceback (if it's not an interpretedPython function) and could cause the traceback to be replaced on the exception, leading it holding onto a freed traceback.
CPython versions tested on:
CPython main branch, 3.12
Operating systems tested on:
Linux