SIGN IN SIGN UP

gh-113956: Make intern_common thread-safe in free-threaded build (gh-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.
S
Sam Gross committed
4629c2215a9a4b3d1ec4a306cd4dd7d11dcfebb4
Parent: 42d645a
Committed by GitHub <noreply@github.com> on 4/23/2026, 6:42:57 PM