FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-113956: Make intern_common thread-safe in free-threaded build (gh-148886) by colesbury · Pull Request #148927 · python/cpython · GitHub

/ cpython Public

[3.14] gh-113956: Make intern_common thread-safe in free-threaded build (gh-148886) - #148927

Merged
colesbury merged 1 commit into
python:3.14from
colesbury:backport-4629c22-3.14
Apr 23, 2026
Merged

[3.14] gh-113956: Make intern_common thread-safe in free-threaded build (gh-148886)#148927
colesbury merged 1 commit into
python:3.14from
colesbury:backport-4629c22-3.14

Conversation

colesbury commented Apr 23, 2026
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Avoid racing with the owning thread's refcount operations when immortalizing an interned string: if we don't own it and its refcount isn't merged, intern a copy we own instead. Use atomic stores in _Py_SetImmortalUntracked so concurrent atomic reads are race-free.

(cherry picked from commit 4629c22)

…ed build (pythongh-148886)

Avoid racing with the owning thread's refcount operations when
immortalizing an interned string: if we don't own it and its refcount
isn't merged, intern a copy we own instead. Use atomic stores in
_Py_SetImmortalUntracked so concurrent atomic reads are race-free.
(cherry picked from commit 4629c22)

Co-authored-by: Sam Gross <colesbury@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL