-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Enable DOTNET_ThreadGuardPages opt-in config setting on 32-bit #117466
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
Enable DOTNET_ThreadGuardPages opt-in config setting on 32-bit #117466
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 moves the DOTNET_ThreadGuardPages configuration check out of the 64-bit-only block so that 32-bit hosts can opt into custom guard pages instead of always using the default.
- Inverts the
ifso non-zero config applies on all platforms - Retains default guard pages only for 64-bit when config is zero
- Keeps a single debug page on 32-bit regardless of config
Comments suppressed due to low confidence (3)
src/coreclr/vm/threads.cpp:6143
- Add tests to verify the new opt-in behavior on 32-bit: ensure zero (default) yields no extra guard pages and positive values apply correctly.
int ThreadGuardPages = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_ThreadGuardPages);
src/coreclr/vm/threads.cpp:6141
- [nitpick] Update the public configuration docs to note that
DOTNET_ThreadGuardPagesnow applies as an opt-in setting on 32-bit hosts as well.
#endif // HOST_64BIT
src/coreclr/vm/threads.cpp:6144
- Consider using
ThreadGuardPages > 0instead of!= 0to prevent negative values from reducing the guard size unexpectedly.
if (ThreadGuardPages != 0)
|
Tagging subscribers to this area: @mangod9 |
janvorli
left a comment
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!
Moves DOTNET_ThreadGuardPages config check out of the 64-bit host check, making the number of pages we save on stackoverflow on 32-bit configurable.