Skip to content

Conversation

mpage
Copy link
Contributor

@mpage mpage commented Apr 24, 2024

The load of ob_ref_local:

return (op->ob_ref_local == _Py_IMMORTAL_REFCNT_LOCAL);

races with stores (example):

_Py_atomic_store_uint32_relaxed(&op->ob_ref_local, local);

Using a relaxed load is sufficient; stores to the field are relaxed.

@colesbury colesbury merged commit f14e9f9 into python:main Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants