-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[release/10.0] JIT: Handle FIELD_LIST for tailcall arg/parameter interference checks
#122287
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: @JulieLeeMSFT, @jakobbotsch |
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 PR fixes a JIT bug where tailcall argument values could be corrupted when forwarding parameters to other functions. The issue was a regression in .NET 10 where new tailcall scenarios exposed incomplete handling of FIELD_LIST operands in interference checks.
- Introduces
FirstOperandhelper method to correctly traverse complex operand structures includingFIELD_LIST - Updates tailcall argument interference detection to handle non-atomic copies (such as
FIELD_LISToperands) - Adds regression test to verify the fix
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/tests/JIT/Regression/JitBlue/Runtime_122138/Runtime_122138.csproj | Test project configuration for the regression test |
| src/tests/JIT/Regression/JitBlue/Runtime_122138/Runtime_122138.cs | Regression test that reproduces the tailcall argument corruption scenario with nullable parameters |
| src/coreclr/jit/lower.h | Declares new FirstOperand helper method |
| src/coreclr/jit/lower.cpp | Implements FirstOperand helper and updates LowerFastTailCall to handle FIELD_LIST operands in interference checks |
JulieLeeMSFT
left a comment
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.
LGTM.
|
/ba-g macOS-13 runner images are retired, but JIT side of the testing is covered via linux-arm64 and linux-x64 |
Customer Impact
The JIT may corrupt the values of arguments when forwarding parameters to other functions as part of a tailcall. Reported by customer in #122138.
Regression
This is a regression in .NET 10 where we started tailcalling in new scenarios not covered by some existing handling.
Testing
Regression test included.
Risk
Low. Detect the case in the existing handling and introduce additional defensive copies for it.