]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-127266: avoid data races when updating type slots (gh-133177)
authorNeil Schemenauer <nas-github@arctrix.com>
Wed, 28 May 2025 01:27:41 +0000 (18:27 -0700)
committerGitHub <noreply@github.com>
Wed, 28 May 2025 01:27:41 +0000 (18:27 -0700)
commitfbbbc10055e0ee0011cf683132be706815480839
tree7c10250ec0564196d4cdfcb79a1d59895639999f
parent7ca6d79fa32d7203ee8d64f47b6b3539a027fdea
gh-127266: avoid data races when updating type slots (gh-133177)

In the free-threaded build, avoid data races caused by updating type
slots or type flags after the type was initially created.  For those
(typically rare) cases, use the stop-the-world mechanism.  Remove the
use of atomics when reading or writing type flags.
Include/internal/pycore_interp_structs.h
Include/internal/pycore_object.h
Include/internal/pycore_typeobject.h
Include/object.h
Include/refcount.h
Lib/test/test_descr.py
Misc/NEWS.d/next/Core_and_Builtins/2025-03-14-13-08-20.gh-issue-127266._tyfBp.rst [new file with mode: 0644]
Objects/typeobject.c
Python/ceval.c
Tools/tsan/suppressions_free_threading.txt