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

[clr-interp] Fix timing of UnhandleException handlers - #122992

#122992
Merged
davidwrighton merged 2 commits into
dotnet:maindotnet/runtime:mainfrom
davidwrighton:fix_unhandle_eh_timingdavidwrighton/runtime:fix_unhandle_eh_timingCopy head branch name to clipboard
Jan 8, 2026
Merged

[clr-interp] Fix timing of UnhandleException handlers#122992
davidwrighton merged 2 commits into
dotnet:maindotnet/runtime:mainfrom
davidwrighton:fix_unhandle_eh_timingdavidwrighton/runtime:fix_unhandle_eh_timingCopy head branch name to clipboard

Conversation

@davidwrighton

Copy link
Copy Markdown
Member
  • The previous logic would run them after finally's, but this change makes them happen when we detect the unhandled exception during first pass EH.

Fixes the baseservices/exceptions/UnhandledExceptionHandler/NoEffectInMainThread test

- The previous logic would run them after finally's, but this change makes them happen when we detect the unhandled exception during first pass EH.

Fixes the baseservices/exceptions/UnhandledExceptionHandler/NoEffectInMainThread test
Copilot AI review requested due to automatic review settings January 7, 2026 23:21
@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.

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 fixes the timing of UnhandledException handlers in the CoreCLR interpreter to trigger during the first pass exception handling rather than after finally blocks execute. This resolves a test failure in the baseservices/exceptions/UnhandledExceptionHandler/NoEffectInMainThread test.

Key Changes

  • Introduces a flag to track when an InterpreterFrame represents a native transition boundary
  • Uses this flag to correctly skip the InterpreterFrame when checking for unhandled exceptions
  • Ensures unhandled exception detection happens at the correct point in the exception handling flow

@janvorli janvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Comment thread src/coreclr/vm/exceptionhandling.cpp
@davidwrighton
davidwrighton merged commit 5b3b2cd into dotnet:main Jan 8, 2026
95 of 98 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 8, 2026
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.

3 participants

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