Skip to content

gh-159041: Fix use-after-free in asyncio task tracking during thread state cleanup - #159073

Open
ngoldbaum wants to merge 6 commits into
python:mainfrom
ngoldbaum:fix-asyncio-ts-clear
Open

ngoldbaum wants to merge 6 commits into
python:mainfrom
ngoldbaum:fix-asyncio-ts-clear

Conversation

@ngoldbaum

@ngoldbaum ngoldbaum commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Move lingering asyncio tasks to the interpreter only after all finalizer-capable thread-state cleanup has completed. Also transfer tasks created by finalizers during thread-state deletion as well.

Add regression tests for both thread-state and interpreter cleanup paths.

Move lingering asyncio tasks to the interpreter only after all
finalizer-capable thread-state cleanup has completed. Also transfer tasks
created by finalizers during interpreter shutdown.

Add regression tests for both thread-state and interpreter cleanup paths.
@ngoldbaum

Copy link
Copy Markdown
Contributor Author

Ping @colesbury @msullivan since you two have been reviewing asyncio changes recently and Kumar is busy.

@ngoldbaum ngoldbaum changed the title gh-159041: Fix asyncio task tracking during thread state cleanup gh-159041: Fix use-after-free in asyncio task tracking during thread state cleanup Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant