]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-117657: Fix TSAN races in setobject.c (GH-121511) (#121541)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 9 Jul 2024 16:36:36 +0000 (18:36 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Jul 2024 16:36:36 +0000 (16:36 +0000)
commitf0d16f7e82ee19433f0336c0c06053c4f63dec05
treed0ab193c2aa4509d49df0ca60027ba6416420a91
parent8d473d8e57ee99381e4467c3660f282eb220efdb
[3.13] gh-117657: Fix TSAN races in setobject.c (GH-121511) (#121541)

The `used` field must be written using atomic stores because `set_len`
and iterators may access the field concurrently without holding the
per-object lock.
(cherry picked from commit 9c08f40a613d9aee78de4ce4ec3e125d1496d148)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Objects/setobject.c
Tools/tsan/suppressions_free_threading.txt