gh-119999: Fix potential race condition in `_Py_ExplicitMergeRefcount` (#120000)
We need to write to `ob_ref_local` and `ob_tid` before `ob_ref_shared`. Once we mark `ob_ref_shared` as merged, some other thread may free the object because the caller also passes in `-1` as `extra` to give up its only reference.
S
Sam Gross committed
4055577221f5f52af329e87f31d81bb8fb02c504
Parent: 109e108
Committed by GitHub <noreply@github.com>
on 6/4/2024, 7:26:26 PM