Skip to content

segfault when deleting an object after returning it#133371

@graingert

Description

@graingert

a slightly minimized segfault:

importasyncioasyncdefasyncfn(): passdefcreate_task(loop, coro, **kwargs): task=asyncio.Task(coro, loop=loop, **kwargs) try: returntaskfinally: # gh-128552: prevent a refcycle of# task.exception().__traceback__->BaseEventLoop.create_task->taskdeltaskasyncdefmain(): t=create_task(asyncio.get_running_loop(), asyncfn(), eager_start=True, name="example") assertt.done() awaittasyncio.run(main(), loop_factory=asyncio.EventLoop)

Originally posted by @graingert in #128306 (comment)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)release-blockertype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    Status

    Done

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions