[Release/6.0] Fix singlefile bundle alignment on OSX ARM64 #69930
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.
This is a small subset of #68845 that is relevant to 6.0 as well
For ARM64 we need to use the same 4K bundle alignment on OSX as on Linux.
The reason for the alignment is not specific to OS, but specific to the instruction set. On ARM64 ADRP instruction works with 4K granularity.
Since we do not perform any fixups for this at load time, we need to keep 4K alignment when placing files in a singlefile bundle.
Customer Impact
Depending on how files are placed in a bundle, we may see a crash when executing R2R code in a singlefile app on OSX.
Fixes: #69923
Testing
Regular test passes.
Manually verified that replacing SDK version
Microsoft.NET.HostModel.dll
with a fixed version makes the crash described in #69923 disappear.Risk
Low.
This is the same alignment strategy as used on ARM64 Linux for a very long time.