op->ob_refcnt = 1;
#endif
#else
- op->ob_tid = _Py_ThreadId();
op->ob_flags = 0;
op->ob_mutex = (PyMutex){ 0 };
+#ifdef _Py_THREAD_SANITIZER
+ _Py_atomic_store_uintptr_relaxed(&op->ob_tid, _Py_ThreadId());
+ _Py_atomic_store_uint8_relaxed(&op->ob_gc_bits, 0);
+ _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, 1);
+ _Py_atomic_store_ssize_relaxed(&op->ob_ref_shared, 0);
+#else
+ op->ob_tid = _Py_ThreadId();
op->ob_gc_bits = 0;
op->ob_ref_local = 1;
op->ob_ref_shared = 0;
#endif
+#endif
#ifdef Py_TRACE_REFS
_Py_AddToAllObjects(op);
#endif
# These warnings trigger directly in a CPython function.
race_top:assign_version_tag
-race_top:new_reference
race_top:_multiprocessing_SemLock_acquire_impl
race_top:list_get_item_ref
race_top:_Py_slot_tp_getattr_hook