[release/5.0] Use minimum supported PAGE_SIZE as stack probe step #45226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #45225 to release/5.0
Customer Impact
Apple Silicon with Rosetta 2 emulation uses a 16K memory page. This configuration sends the runtime into untested and unstable stack probing configuration which causes crashes in Rosetta 2 emulation. We need this fixed to support Apple Silicon.
Regression
No. Apple Silicon is a new scenario which we are backporting to .NET 5
Testing
Risk
This is a low risk change. It changes stack probing to use a constant 4k page size. This is the industry standard minimum page size used across all supported CPU architectures. The use of a constant reduces complexity and simplifies testing. Fixes issues with mismatched AOT and runtime page sizes.
@dotnet/jit-contrib
cc @sdmaclea