Skip to content

Commit

Permalink
pythongh-128759: fix data race in type_modified_unlocked
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jan 12, 2025
1 parent 5e65a1a commit a767905
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 @@ -1038,7 +1038,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 (FT_ATOMIC_LOAD_UINT32_RELAXED(type->tp_version_tag) == 0) {
return;
}
// Cannot modify static builtin types.
Expand Down

0 comments on commit a767905

Please sign in to comment.