GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — gh-115184: Fix refleak tracking issues in free-threaded build by colesbury · Pull Request #115188 · python/cpython Conversation
|
|
🤖 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.
There was an error while loading. Please reload this page.
| _Py_AddRefTotal(_PyInterpreterState_GET(), extra); | ||
| #endif | ||
|
|
||
| _Py_atomic_store_uint32_relaxed(&op->ob_ref_local, 0); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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 an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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 an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…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.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.