Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Few interpreter EH fixes - #120684

#120684
Merged
janvorli merged 3 commits into
dotnet:maindotnet/runtime:mainfrom
janvorli:interpreter-eh-fixes-1janvorli/runtime:interpreter-eh-fixes-1Copy head branch name to clipboard
Oct 14, 2025
Merged

Few interpreter EH fixes#120684
janvorli merged 3 commits into
dotnet:maindotnet/runtime:mainfrom
janvorli:interpreter-eh-fixes-1janvorli/runtime:interpreter-eh-fixes-1Copy head branch name to clipboard

Conversation

@janvorli

Copy link
Copy Markdown
Member
  • Correctly normalize objects that are not derived from Exception class before throwing them from the interpreter
  • Ensure managed exceptions from QCALLs invoked by the interpreter are properly handled
  • Add null check to INTOP_ZEROBLK_IMM

* Correctly normalize objects that are not derived from Exception class
  before throwing them from the interpreter
* Ensure managed exceptions from QCALLs invoked by the interpreter are
  properly handled
* Add null check to INTOP_ZEROBLK_IMM
@janvorli janvorli added this to the 11.0.0 milestone Oct 14, 2025
@janvorli janvorli self-assigned this Oct 14, 2025
@janvorli
janvorli requested a review from BrzVlad as a code owner October 14, 2025 00:56
Copilot AI review requested due to automatic review settings October 14, 2025 00:56
@janvorli
janvorli requested a review from kg as a code owner October 14, 2025 00:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 implements several exception handling fixes for the interpreter in CoreCLR. The changes ensure proper normalization of thrown objects and improved handling of managed exceptions from native calls.

Key changes:

  • Extracts duplicated exception normalization logic into a reusable NormalizeThrownObject function
  • Adds proper exception handling for QCALL invocations within the interpreter using PAL_TRY/PAL_EXCEPT
  • Adds null pointer validation to the INTOP_ZEROBLK_IMM interpreter operation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/coreclr/vm/jithelpers.cpp Refactors IL_Throw to use the new NormalizeThrownObject function, removing duplicate code
src/coreclr/vm/interpexec.cpp Adds exception handling for unmanaged method transitions, null check for INTOP_ZEROBLK_IMM, and proper normalization for interpreter throws
src/coreclr/vm/exceptionhandling.h Declares the new NormalizeThrownObject function
src/coreclr/vm/exceptionhandling.cpp Implements the NormalizeThrownObject function with the extracted logic

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Comment thread src/coreclr/vm/interpexec.cpp
Comment thread src/coreclr/vm/interpexec.cpp Outdated
Comment thread src/coreclr/vm/interpexec.cpp Outdated
Comment thread src/coreclr/vm/interpexec.cpp Outdated
@janvorli
janvorli merged commit 5b6403b into dotnet:main Oct 14, 2025
95 of 97 checks passed
@janvorli
janvorli deleted the interpreter-eh-fixes-1 branch October 14, 2025 20:35
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 2025
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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.