Skip to content

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
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
…128367)

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.
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