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

gh-128212: Fix race in _PyUnicode_CheckConsistency #128367

Merged

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Dec 30, 2024

There was a data race on the utf8 field between PyUnicode_SET_UTF8 and _PyUnicode_CheckConsistency. Use the _PyUnicode_UTF8() accessor, which uses an atomic load internally, to avoid the data race.

There was a data race on the utf8 field between `PyUnicode_SET_UTF8` and
`_PyUnicode_CheckConsistency`. Use the `_PyUnicode_UTF8()` accessor,
which uses an atomic load internally, to avoid the data race.
@colesbury colesbury merged commit 8eebe4e into python:main Jan 2, 2025
49 checks passed
@colesbury colesbury deleted the gh-128212-PyUnicode-CheckConsistency branch January 2, 2025 19:02
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