Skip to content

Conversation

@davidwrighton
Copy link
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
Contributor

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

Copy link
Contributor

Copilot AI left a 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 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

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@davidwrighton davidwrighton merged commit 5b3b2cd into dotnet:main Jan 8, 2026
95 of 98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants