Skip to content

Poison VM stack #19334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Poison VM stack #19334

wants to merge 2 commits into from

Conversation

arnaud-lb
Copy link
Member

@arnaud-lb arnaud-lb commented Jul 31, 2025

Use the ASAN/MSAN interfaces to poison new VM stack pages and poped frames. This is useful because without this instrumentation, ASAN considers memory regions past the current frame as addressable (since we allocate one page at a time), and MSAN considers them initialized if they have been used by other function calls before.

I extracted this from the partials implementation, for which it has been useful to spot issues. This was before #18858 was published, but I still took a little bit of inspiration from it while extracting this PR.

@arnaud-lb arnaud-lb changed the title Poison VM stack [wip] Poison VM stack Jul 31, 2025
@arnaud-lb arnaud-lb changed the title [wip] Poison VM stack Poison VM stack Aug 1, 2025
@arnaud-lb arnaud-lb marked this pull request as ready for review August 1, 2025 16:50
@arnaud-lb arnaud-lb requested a review from dstogov as a code owner August 1, 2025 16:50
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.

1 participant