Skip to content

Commit

Permalink
pythongh-128759: fix data race in type_modified_unlocked (pythonGH-…
Browse files Browse the repository at this point in the history
…128764)

(cherry picked from commit 6e1e780)

Co-authored-by: sobolevn <[email protected]>
  • Loading branch information
sobolevn committed Jan 13, 2025
1 parent 33c0ba0 commit 1919228
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ type_modified_unlocked(PyTypeObject *type)
We don't assign new version tags eagerly, but only as
needed.
*/
if (type->tp_version_tag == 0) {
if (_Py_atomic_load_uint_relaxed(type->tp_version_tag) == 0) {
return;
}
// Cannot modify static builtin types.
Expand Down

0 comments on commit 1919228

Please sign in to comment.