Closed
Description
Bug report
There are a few bugs with refleak tracking in the free-threaded build uncovered in #114824:
- We should account for blocks in abandoned segments
- We should stop-the-world before traversing mimalloc heaps in case there are still other threads running
- The mimalloc heap and segment traversal must call
_mi_page_free_collect(page, true);
to properly account for blocks that were deferred freed by other threads. We need to call this earlier than we currently do (before computing page stats). _Py_DecRefSharedDebug
was missing a_Py_IncRefTotal