Skip to content
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

[Release/6.0] Fix singlefile bundle alignment on OSX ARM64 #69930

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

VSadov
Copy link
Member

@VSadov VSadov commented May 27, 2022

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.

* Same alignment in the bundle on OSX as on Linux

* Extra VA gap between section in casse we run from sf bundle

* Rename prevSectionEnd -> prevSectionEndAligned and make it aligned.

* Suppress assert for now on OSX
@ghost
Copy link

ghost commented May 27, 2022

Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

This is a small subset of #68845 that is relevant to 6.0 as well

For ARM64 we need to use the same 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.

Author: VSadov
Assignees: -
Labels:

area-Single-File

Milestone: -

@VSadov VSadov requested a review from janvorli May 28, 2022 00:48
@teo-tsirpanis teo-tsirpanis added this to the 6.0.x milestone May 30, 2022
@VSadov
Copy link
Member Author

VSadov commented May 31, 2022

@vitek-karas , could you take a look? This is a very simple fix.

@JulieLeeMSFT
Copy link
Member

cc @agocke @jeffschwMSFT @carlossanlop.

@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jun 2, 2022
@rbhanda rbhanda modified the milestones: 6.0.x, 6.0.7 Jun 2, 2022
@carlossanlop
Copy link
Member

Servicing-approved label applied. CI passed. Area owner signed off.
:shipit:

@carlossanlop carlossanlop merged commit a79d7c4 into dotnet:release/6.0 Jun 9, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Single-File Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants