]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117657: Fix data races reported by TSAN in some set methods (#120914)
authorAN Long <aisk@users.noreply.github.com>
Mon, 1 Jul 2024 19:11:39 +0000 (03:11 +0800)
committerGitHub <noreply@github.com>
Mon, 1 Jul 2024 19:11:39 +0000 (15:11 -0400)
commit294e72496439da984cb8dba9100d3613c8cc8a6d
tree8b205b9af78fdd7469bb462b81b7a0b51b748754
parent9bcb7d8c6f8277c4e76145ec4c834213167e3387
gh-117657: Fix data races reported by TSAN in some set methods (#120914)

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.
Include/internal/pycore_object.h
Modules/_collectionsmodule.c
Objects/dictobject.c
Objects/setobject.c
Objects/typeobject.c
Tools/tsan/suppressions_free_threading.txt