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

Workaround broken special APC when running x64 on arm64 windows #102333

Merged

Conversation

janvorli
Copy link
Member

In ARM64 windows older than 24H2, the special APC is broken when running x64 emulation. The callback that gets invoked doesn't get an argument with correct CONTEXT of the interrupted location. This change disables using the special APC for runtime suspension when running on the affected Windows versions.

Close #100425

In ARM64 windows older than 24H2, the special APC is broken when running
x64 emulation. The callback that gets invoked doesn't get an argument
with correct CONTEXT of the interrupted location. This change disables
using the special APC for runtime suspension when running on the
affected Windows versions.

Close dotnet#100425
@janvorli janvorli added this to the 9.0.0 milestone May 16, 2024
@janvorli janvorli requested a review from jkotas May 16, 2024 18:30
@janvorli janvorli self-assigned this May 16, 2024
@janvorli
Copy link
Member Author

cc: @mangod9, @tommcdon

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@jkotas
Copy link
Member

jkotas commented May 16, 2024

We have the same code in NAOT: https://github.com/dotnet/runtime/blob/main/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp#L636-L639 . Could you please make the same fix there as well?

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Member

@tommcdon tommcdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@janvorli janvorli merged commit 379f7b1 into dotnet:main May 16, 2024
89 checks passed
@janvorli janvorli deleted the workaround-broken-special-apc-x64-on-arm64 branch May 16, 2024 22:24
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
…et#102333)

* Workaround broken special APC when running x64 on arm64 windows

In ARM64 windows older than 24H2, the special APC is broken when running
x64 emulation. The callback that gets invoked doesn't get an argument
with correct CONTEXT of the interrupted location. This change disables
using the special APC for runtime suspension when running on the
affected Windows versions.

Close dotnet#100425

* Make the same fix for NativeAOT
@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime crashing on startup on emulated x64-on-ARM64 Windows
4 participants