summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsobolevn <mail@sobolevn.me>2025-01-13 07:40:52 (GMT)
committerGitHub <noreply@github.com>2025-01-13 07:40:52 (GMT)
commit6e1e78054060ad326f26dd8dbf12adfedbb52883 (patch)
tree4d07f7ce294625872c1ead8c6e36581f1c59c14e
parentd0ecbdd838034c1f061e9b4e9b54a900141458c3 (diff)
downloadcpython-6e1e78054060ad326f26dd8dbf12adfedbb52883.zip
cpython-6e1e78054060ad326f26dd8dbf12adfedbb52883.tar.gz
cpython-6e1e78054060ad326f26dd8dbf12adfedbb52883.tar.bz2
gh-128759: fix data race in `type_modified_unlocked` (#128764)
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 680846f..0f5ebc6 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.