Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-121368: Fix seq lock memory ordering in _PyType_Lookup (GH-121388) #121505

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jul 8, 2024

The _PySeqLock_EndRead function needs an acquire fence to ensure that
the load of the sequence happens after any loads within the read side
critical section. The missing fence can trigger bugs on macOS arm64.

Additionally, we need a release fence in _PySeqLock_LockWrite to
ensure that the sequence update is visible before any modifications to
the cache entry.
(cherry picked from commit 1d3cf79)

Co-authored-by: Sam Gross colesbury@gmail.com

…onGH-121388)

The `_PySeqLock_EndRead` function needs an acquire fence to ensure that
the load of the sequence happens after any loads within the read side
critical section. The missing fence can trigger bugs on macOS arm64.

Additionally, we need a release fence in `_PySeqLock_LockWrite` to
ensure that the sequence update is visible before any modifications to
the cache entry.
(cherry picked from commit 1d3cf79)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants