Skip to content

[3.14] gh-159739: Release replaced type alias values (GH-160167) - #160243

Merged
JelleZijlstra merged 1 commit into
python:3.14from
miss-islington:backport-d36a3f6-3.14
Oct 23, 2026
Merged

JelleZijlstra merged 1 commit into
python:3.14from
miss-islington:backport-d36a3f6-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

A type alias can be evaluated again before an earlier evaluation finishes, either recursively or in another thread. The later completion overwrites the cached value without releasing it, permanently leaking that value; synchronize cache access and release the replaced value outside the lock. Backport to 3.15 and 3.14.
(cherry picked from commit d36a3f6)

Co-authored-by: Jelle Zijlstra jelle@openai.com

A type alias can be evaluated again before an earlier evaluation finishes, either recursively or in another thread. The later completion overwrites the cached value without releasing it, permanently leaking that value; synchronize cache access and release the replaced value outside the lock. Backport to 3.15 and 3.14.
(cherry picked from commit d36a3f6970407bb91dd863a10f0b42425a7e954e)

Co-authored-by: Jelle Zijlstra <jelle@openai.com>
@JelleZijlstra
JelleZijlstra enabled auto-merge (squash) October 22, 2026 14:34
@JelleZijlstra
JelleZijlstra merged commit ef844c8 into python:3.14 Oct 23, 2026
90 of 92 checks passed
@miss-islington
miss-islington deleted the backport-d36a3f6-3.14 branch October 23, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants