Skip to content

Commit acf7da9

Browse files
sobolevnmiss-islington
authored andcommitted
gh-128759: fix data race in type_modified_unlocked (GH-128764)
(cherry picked from commit 6e1e780) Co-authored-by: sobolevn <[email protected]>
1 parent 33c0ba0 commit acf7da9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/typeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ type_modified_unlocked(PyTypeObject *type)
996996
We don't assign new version tags eagerly, but only as
997997
needed.
998998
*/
999-
if (type->tp_version_tag == 0) {
999+
if (FT_ATOMIC_LOAD_UINT_RELAXED(type->tp_version_tag) == 0) {
10001000
return;
10011001
}
10021002
// Cannot modify static builtin types.

0 commit comments

Comments
 (0)