Unify SEH wrapping for method calls in the interpexec.cpp#121311
Merged
janvorli merged 5 commits intodotnet:mainfrom Nov 5, 2025
Merged
Unify SEH wrapping for method calls in the interpexec.cpp#121311janvorli merged 5 commits intodotnet:mainfrom
janvorli merged 5 commits intodotnet:mainfrom
Conversation
This change adds a templated way to wrap any method call in a SEH exception try / catch. Until now, we were adding a new function for each case that needed this wrapping.
Contributor
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors exception handling for method calls in the interpreter by introducing a generic CallWithSEHWrapper template function to replace specialized wrapper functions (CallPreStub and CallGetMethodDescOfVirtualizedCode). This consolidates duplicate SEH exception handling logic into a single reusable template.
- Replaced two specialized SEH wrapper functions with a single generic template
- Updated all call sites to use the new generic wrapper
- Consolidated duplicate exception handling logic
davidwrighton
approved these changes
Nov 3, 2025
This was referenced Nov 3, 2025
jkoritzinsky
reviewed
Nov 4, 2025
Member
Author
|
Hmm, the new version breaks the interpreter test, I am investigating ... |
Member
Author
|
Ah, copy and paste error for the GetMethodDescOfVirtualizedCode |
janvorli
commented
Nov 4, 2025
Fix copy and paste error
Removed the CallGetMethodDescOfVirtualizedCode function, which is now a dead code.
janvorli
commented
Nov 4, 2025
Fix arguments
Member
Author
|
/ba-g infra issues and failures unrelated to the change |
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.
This change adds a way to wrap any method call in a SEH exception try / catch. Until now, we were adding a new function for each case that needed this wrapping.
I've verified that the generated code in the release build is the same as before this change.