-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
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
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error