File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2485,13 +2485,20 @@ new_reference(PyObject *op)
2485
2485
op -> ob_refcnt = 1 ;
2486
2486
#endif
2487
2487
#else
2488
- op -> ob_tid = _Py_ThreadId ();
2489
2488
op -> ob_flags = 0 ;
2490
2489
op -> ob_mutex = (PyMutex ){ 0 };
2490
+ #ifdef _Py_THREAD_SANITIZER
2491
+ _Py_atomic_store_uintptr_relaxed (& op -> ob_tid , _Py_ThreadId ());
2492
+ _Py_atomic_store_uint8_relaxed (& op -> ob_gc_bits , 0 );
2493
+ _Py_atomic_store_uint32_relaxed (& op -> ob_ref_local , 1 );
2494
+ _Py_atomic_store_ssize_relaxed (& op -> ob_ref_shared , 0 );
2495
+ #else
2496
+ op -> ob_tid = _Py_ThreadId ();
2491
2497
op -> ob_gc_bits = 0 ;
2492
2498
op -> ob_ref_local = 1 ;
2493
2499
op -> ob_ref_shared = 0 ;
2494
2500
#endif
2501
+ #endif
2495
2502
#ifdef Py_TRACE_REFS
2496
2503
_Py_AddToAllObjects (op );
2497
2504
#endif
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ race:free_threadstate
22
22
# These warnings trigger directly in a CPython function.
23
23
24
24
race_top:assign_version_tag
25
- race_top:new_reference
26
25
race_top:_multiprocessing_SemLock_acquire_impl
27
26
race_top:list_get_item_ref
28
27
race_top:_Py_slot_tp_getattr_hook
You can’t perform that action at this time.
0 commit comments