]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-117657: Fix data races reported by TSAN in some set methods (GH-120914...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 1 Jul 2024 19:40:28 +0000 (21:40 +0200)
committerGitHub <noreply@github.com>
Mon, 1 Jul 2024 19:40:28 +0000 (19:40 +0000)
commit06fd745dd91c757b643f69847cf1234609968132
treee4852b96f5571798a5c8afabc2de29945f82b5fa
parentfc0b1cbdfe72ba6155df33455a62c9d7042c9359
[3.13] gh-117657: Fix data races reported by TSAN in some set methods (GH-120914) (#121240)

Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed
atomic loads in the free-threaded build.

After this change, the TSAN doesn't report data races for this method.
(cherry picked from commit 294e72496439da984cb8dba9100d3613c8cc8a6d)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Include/internal/pycore_object.h
Modules/_collectionsmodule.c
Objects/dictobject.c
Objects/setobject.c
Objects/typeobject.c
Tools/tsan/suppressions_free_threading.txt