| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- We did not account for abandoned segments, which could miss blocks in multithreaded runs. - The mimalloc heap traversal needed to call "_mi_page_free_collect" earlier in order to get an accurate count of blocks in use. - `_Py_DecRefSharedDebug` was missing a `_Py_IncRefTotal`, but this was mostly offset by a missing accounting in `_Py_ExplicitMergeRefcount`. - get_num_global_allocated_blocks should pause other threads to ensure that traversing the mimalloc heaps is safe.
|
🤖 New build scheduled with the buildbot fleet by @colesbury for commit 1b17640 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
| _Py_AddRefTotal(_PyInterpreterState_GET(), extra); | ||
| #endif | ||
|
|
||
| _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, 0); |
There was a problem hiding this comment.
Do I understand this correctly that we're not racing here because we're either own the owning thread or the world is stopped for GC?
Sorry, something went wrong.
There was a problem hiding this comment.
The possible cases are:
The GC could have used this code path, but it uses a different function that avoids atomics (because it's stopped the world).
The reason case (2) is thread-safe is a bit subtle:
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
…ython#115188) Fixes a few issues related to refleak tracking in the free-threaded build: - Count blocks in abandoned segments - Call `_mi_page_free_collect` earlier during heap traversal in order to get an accurate count of blocks in use. - Add missing refcount tracking in `_Py_DecRefSharedDebug` and `_Py_ExplicitMergeRefcount`. - Pause threads in `get_num_global_allocated_blocks` to ensure that traversing the mimalloc heaps is safe.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.