-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix up hijacking on x86 (preserve async continuation register) #123084
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
Conversation
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
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 pull request attempts to fix GC hijacking on x86 to preserve the ECX register during garbage collection, as it may contain an async continuation according to the CLR ABI. The PR adds the PTFF_SAVE_RCX flag definition and includes it in the register save flags for two hijack handlers.
Changes:
- Adds
PTFF_SAVE_RCXconstant definition in i386/AsmMacros.inc - Updates
_RhpGcProbeHijack@0to include PTFF_SAVE_RCX in its register save flags - Updates
_RhpGcStressHijack@0to include PTFF_SAVE_RCX in its register save flags
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/coreclr/nativeaot/Runtime/i386/AsmMacros.inc | Adds PTFF_SAVE_RCX flag constant (0x00000200h) for saving ECX register during hijack |
| src/coreclr/nativeaot/Runtime/i386/GcProbe.asm | Updates two hijack functions to include PTFF_SAVE_RCX in their save flags when waiting for GC |
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
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Flag ecx (see async calling convention) during GC as it might contain an async continuation.
Contributes to #122492.