-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Increase default stack guard on x86 Windows #118277
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
Increase default stack guard on x86 Windows #118277
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR increases the default stack guard pages on x86 Windows to prevent crashes in Microsoft Cloud Test environments when a managed debugger encounters stack overflow exceptions. The change restructures the conditional compilation logic to provide more consistent guard page allocation across platforms.
- Consolidates debug-specific guard page logic under a single
INDEBUG
macro - Increases default guard pages for 32-bit platforms from 0 to 1 page
- Maintains existing 64-bit platform defaults (3 pages plus debug overhead)
e293592
to
5d76a67
Compare
Tagging subscribers to this area: @mangod9 |
5d76a67
to
d9e7e06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
I have noticed that the comments at the changed code about various sizes are completely outdated, we should either remove it completely or update it to match the reality. |
I've created #118401 to track the comment update. |
@janvorli can you merge this for me? I don't have rights |
In Microsoft Cloud Test environments, the target process would crash without stopping when running under a managed debugger and the target process triggered a stack overflow exception. This increases the default count of thread guard pages to avoid this.