FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-115491: Keep some fields valid across allocations in obmalloc (free-threading) by colesbury · Pull Request #115745 · python/cpython · GitHub

Repository navigation

gh-115491: Keep some fields valid across allocations in obmalloc (free-threading) - #115745

Merged
DinoV merged 1 commit into
python:mainfrom
colesbury:gh-115491-debug-fill-obmalloc
Feb 21, 2024
Merged

DinoV merged 1 commit into
python:mainfrom
colesbury:gh-115491-debug-fill-obmalloc

Conversation

colesbury commented Feb 20, 2024 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

This avoids overwriting the first few fields in the PyObject header with debug bytes (like 0xDD for dead bytes) in the free-threaded build. These fields may be accessed for a period after an object is deallocated.

For simplicity, this skips some of the filling of debug bytes for the "realloc" calls in the free-threaded build, because that case is more complex. The calls that delegate to mimalloc will be filled by mimalloc with debug bytes anyways.

DinoV left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM!

DinoV merged commit 347acde into python:main Feb 21, 2024
colesbury deleted the gh-115491-debug-fill-obmalloc branch February 21, 2024 18:00
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL