Skip to content

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Oct 17, 2025

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.

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.
@colesbury colesbury added skip news needs backport to 3.14 bugs and security fixes labels Oct 17, 2025
@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Oct 17, 2025
@colesbury colesbury marked this pull request as ready for review October 17, 2025 17:44
@colesbury colesbury merged commit f11ec6e into python:main Oct 20, 2025
55 checks passed
@colesbury colesbury deleted the gh-140263-test_lock_two_threads branch October 20, 2025 13:58
@miss-islington-app
Copy link

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 20, 2025
)

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 f11ec6e)

Co-authored-by: Sam Gross <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Oct 20, 2025

GH-140369 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Oct 20, 2025
colesbury added a commit that referenced this pull request Oct 20, 2025
…h-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 f11ec6e)

Co-authored-by: Sam Gross <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants