Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.15] gh-155363: Fix QSBR slot leak on thread state creation failure (gh-155365) - #155579

Merged
hugovk merged 2 commits into
python:3.15from
miss-islington:backport-44e92d4-3.15
Aug 22, 2026
Merged

[3.15] gh-155363: Fix QSBR slot leak on thread state creation failure (gh-155365)#155579
hugovk merged 2 commits into
python:3.15from
miss-islington:backport-44e92d4-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

In the free-threaded build, new_threadstate() reserves a QSBR thread-state
slot before it can still fail for other reasons, but the failure paths only
called free_threadstate(), which does not know about the reservation.
Restructure code so failure path doesn't leak.
(cherry picked from commit 44e92d4)

Co-authored-by: Neil Schemenauer [email protected]

…ythongh-155365)

In the free-threaded build, new_threadstate() reserves a QSBR thread-state
slot before it can still fail for other reasons, but the failure paths only
called free_threadstate(), which does not know about the reservation.
Restructure code so failure path doesn't leak.
(cherry picked from commit 44e92d4)

Co-authored-by: Neil Schemenauer <[email protected]>
@hugovk
hugovk merged commit dd4bd4c into python:3.15 Aug 22, 2026
58 checks passed
@miss-islington
miss-islington deleted the backport-44e92d4-3.15 branch August 22, 2026 09:39
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.

4 participants