cpython
cpython copied to clipboard
gh-132070: Fix PyObject_Realloc thread-safety in free threaded Python
The PyObject header reference count fields must be initialized using atomic operations because they may be concurrently read by another thread (e.g., from _Py_TryIncref).
- Issue: gh-132070
Reimplementing the mi_realloc logic in obmalloc.c feels a bit dirty, but it also seems better than the alternatives.
:robot: New build scheduled with the buildbot fleet by @colesbury for commit 3387cd2415033c0e367d8303c39103594018949b :robot:
Results will be shown at:
https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F143441%2Fmerge
If you want to schedule another build, you need to add the :hammer: test-with-refleak-buildbots label again.