]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-140263: Fix data race in test_lock_two_threads (gh-140264)
authorSam Gross <colesbury@gmail.com>
Mon, 20 Oct 2025 13:58:05 +0000 (09:58 -0400)
committerGitHub <noreply@github.com>
Mon, 20 Oct 2025 13:58:05 +0000 (09:58 -0400)
commitf11ec6e643f54f4ee698f7dfc878812a315f2af4
treead00ccef3c6062152812f5a1341c16d27c1629eb
parente4f6445f308109fdeb2c0e668c795fdb1ad335d0
gh-140263: Fix data race in test_lock_two_threads (gh-140264)

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.
Modules/_testinternalcapi/test_lock.c