You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep ob_tid, ob_ref_local, and ob_ref_shared fields valid across allocations in free-threaded build #115491
The free-threaded implementation of dict and list try avoid acquiring locks during read operations. To support this, we need to be able to access the reference count fields of Python objects after they are deallocated (and possibly reallocated). Some of this support is provided by #115103. Additionally, we need to ensure that the debug allocators do not overwrite these fields with "dead" bytes 0xDD, which might make the object look "alive" by having a non-zero reference count.
We still would like to overwrite the rest of the allocation (i.e., from ob_type onwards) to detect use-after-frees in debug builds.
Activity
pythongh-115491: Keep some fields valid across allocations (free-thre…
pythongh-115491: Keep some fields valid across allocations in obmallo…
gh-115491: Keep some fields valid across allocations (free-threading) (…
pythongh-115491: Keep some fields valid across allocations in obmallo…
gh-115491: Keep some fields valid across allocations in obmalloc (fre…
colesbury commentedon Feb 21, 2024
This still needs the mimalloc support in #115103 to fully preserve the fields, but the changes to filling debug bytes is done now.
pythongh-115491: Fix compiler warning on macOS
gh-115491: Fix Clang compiler warning (#116153)
pythongh-115491: Keep some fields valid across allocations (free-thre…
pythongh-115491: Keep some fields valid across allocations in obmallo…
pythongh-115491: Fix Clang compiler warning (python#116153)
pythongh-115491: Fix Clang compiler warning (python#116153)
pythongh-115491: Keep some fields valid across allocations (free-thre…
pythongh-115491: Keep some fields valid across allocations in obmallo…
pythongh-115491: Fix Clang compiler warning (python#116153)
pythongh-115491: Keep some fields valid across allocations (free-thre…
pythongh-115491: Keep some fields valid across allocations in obmallo…
Re-apply CPython-specific changes to mimalloc v2.5.2
Re-apply CPython-specific changes to mimalloc v2.5.2