]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-140263: Fix data race in test_lock_two_threads (gh-140264) (gh-140369)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 20 Oct 2025 14:25:42 +0000 (16:25 +0200)
committerGitHub <noreply@github.com>
Mon, 20 Oct 2025 14:25:42 +0000 (14:25 +0000)
commit6493a6aaf3cfd7ccf6bb9de76e1a5c5e28feb75b
treeb77810c71d18c33b3194f749b9d3d96ba375ca6e
parentd7fe4e99a2d1b660d444876c721c8889b8a9fd28
[3.14] gh-140263: Fix data race in test_lock_two_threads (gh-140264) (gh-140369)

Clang-20 detects a data race between the unlock and the non-atomic
read of the lock state. Use a relaxed load for the assertion to avoid
the race.
(cherry picked from commit f11ec6e643f54f4ee698f7dfc878812a315f2af4)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Modules/_testinternalcapi/test_lock.c