]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-117657: Fix data races when writing / reading `ob_gc_bits` (GH-118292)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 8 May 2024 21:31:37 +0000 (23:31 +0200)
committerGitHub <noreply@github.com>
Wed, 8 May 2024 21:31:37 +0000 (21:31 +0000)
commit7b9ca26812fabcd1202238c989f0f0a9e5b02e87
tree6fdc1fa02b4ec5adb365b31d1112ae79b53f3748
parent8f31af68d0767d4bc56022ab7cc30b1c7bd6a676
[3.13] gh-117657: Fix data races when writing / reading `ob_gc_bits` (GH-118292) (#118796)

Use relaxed atomics when reading / writing to the field. There are still a
few places in the GC where we do not use atomics. Those should be safe as
the world is stopped.
(cherry picked from commit cb6f75a32ca2649c6cc1cabb0301eb783efbd55b)

Co-authored-by: mpage <mpage@meta.com>
Include/internal/pycore_gc.h
Include/internal/pycore_object.h
Objects/object.c
Tools/tsan/suppressions_free_threading.txt