[clr-interp] Handle tail-call return conversions, by requiring that the return type be equivalent in stack layout#121260
Merged
davidwrighton merged 2 commits intodotnet:mainfrom Nov 3, 2025
Conversation
…he return type be equivalent in stack layout
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds validation for tail call compatibility in the CoreCLR interpreter by introducing a new function DisallowTailCall that checks return type compatibility between caller and callee signatures. The change prevents incompatible tail calls from being executed and properly handles the CEE_JMP instruction when return types don't match.
- Adds return type validation for tail calls comparing stack types and value class types
- Integrates the validation into the call emission logic with proper error handling for CEE_JMP
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Open
3 tasks
Member
Author
|
/ba-g all the failures are known infrastructure issues which are either now fixed or under new investigations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The current behavior was allowing uninitialized data to show up as return values. This preserves all cases I believe to be important.