diff options
-rw-r--r-- | Objects/dictobject.c | 4 | ||||
-rw-r--r-- | Tools/tsan/suppressions_free_threading.txt | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 58f34c3..c3516df 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -441,7 +441,7 @@ static void free_keys_object(PyDictKeysObject *keys, bool use_qsbr); static inline void dictkeys_incref(PyDictKeysObject *dk) { - if (dk->dk_refcnt == _Py_IMMORTAL_REFCNT) { + if (FT_ATOMIC_LOAD_SSIZE_RELAXED(dk->dk_refcnt) == _Py_IMMORTAL_REFCNT) { return; } #ifdef Py_REF_DEBUG @@ -453,7 +453,7 @@ dictkeys_incref(PyDictKeysObject *dk) static inline void dictkeys_decref(PyInterpreterState *interp, PyDictKeysObject *dk, bool use_qsbr) { - if (dk->dk_refcnt == _Py_IMMORTAL_REFCNT) { + if (FT_ATOMIC_LOAD_SSIZE_RELAXED(dk->dk_refcnt) == _Py_IMMORTAL_REFCNT) { return; } assert(dk->dk_refcnt > 0); diff --git a/Tools/tsan/suppressions_free_threading.txt b/Tools/tsan/suppressions_free_threading.txt index 80191d6..1408103 100644 --- a/Tools/tsan/suppressions_free_threading.txt +++ b/Tools/tsan/suppressions_free_threading.txt @@ -29,8 +29,6 @@ race:_PyType_HasFeature race:assign_version_tag race:compare_unicode_unicode race:delitem_common -race:dictkeys_decref -race:dictkeys_incref race:dictresize race:gc_collect_main race:gc_restore_tid |