https://github.com/python/cpython/commit/6e1e78054060ad326f26dd8dbf12adfedbb52883
commit: 6e1e78054060ad326f26dd8dbf12adfedbb52883
branch: main
author: sobolevn <[email protected]>
committer: sobolevn <[email protected]>
date: 2025-01-13T07:40:52Z
summary:

gh-128759: fix data race in `type_modified_unlocked` (#128764)

files:
M Objects/typeobject.c

diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 680846f1c0b865..0f5ebc6f90773d 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -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_UINT_RELAXED(type->tp_version_tag) == 0) {
         return;
     }
     // Cannot modify static builtin types.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to