Skip to content

Need to keep traceback alive in WITH_EXCEPT_START #130595

Open
@DinoV

Description

@DinoV

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

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy