]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-133467: fix data race in `type_set_name` (GH-137302) (#137303)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 7 Oct 2025 18:18:23 +0000 (20:18 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Oct 2025 18:18:23 +0000 (18:18 +0000)
commitbf397e272c2bee639c3ba0208c221f7dd9447bb6
treedf7826abc6c6443c22f5e041387fc1e0c2401bf9
parent070993b8ad26e6dd0f97d07db19d1400aa613a47
[3.14] gh-133467: fix data race in `type_set_name` (GH-137302) (#137303)

gh-133467: fix data race in `type_set_name` (GH-137302)

Fix data race in `type_set_name` by assigning name under stop the world pause making it thread safe in free-threading.
(cherry picked from commit e99bc7fd44bbbf2464c37d5a57777ac0e1264c37)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Lib/test/test_free_threading/test_type.py
Objects/typeobject.c
Tools/tsan/suppressions_free_threading.txt