Skip to content

Suppress debugger filter notification for UCO entrypoint during EH dispatch#127101

Merged
jkotas merged 5 commits intodotnet:mainfrom
tommcdon:dev/tommcdon/fix_debugger_unhandled_notification
Apr 18, 2026
Merged

Suppress debugger filter notification for UCO entrypoint during EH dispatch#127101
jkotas merged 5 commits intodotnet:mainfrom
tommcdon:dev/tommcdon/fix_debugger_unhandled_notification

Conversation

@tommcdon
Copy link
Copy Markdown
Member

PR #126222 moved the app entrypoint from native CallDescrWorkerInternal to managed Environment.CallEntryPoint (UnmanagedCallersOnly). This method has a filter clause (catch when (captureException)) that exists in the EH table even when captureException is false. During first-pass exception dispatch, MakeCallbacksRelatedToHandler notifies the debugger about the filter via ExceptionFilter() before the filter funclet evaluates. The debugger intercepts at this notification, preventing the exception from propagating as unhandled — breaking debugger exception interception scenarios.

Skip the debugger ExceptionFilter notification for the known UCO entrypoint method while preserving profiler and ETW notifications.

…spatch

PR dotnet#126222 moved the app entrypoint from native CallDescrWorkerInternal to
managed Environment.CallEntryPoint (UnmanagedCallersOnly). This method has
a filter clause (catch when (captureException)) that exists in the EH table
even when captureException is false. During first-pass exception dispatch,
MakeCallbacksRelatedToHandler notifies the debugger about the filter via
ExceptionFilter() before the filter funclet evaluates. The debugger
intercepts at this notification, preventing the exception from propagating
as unhandled — breaking debugger exception interception scenarios.

Skip the debugger ExceptionFilter notification for the known UCO entrypoint
method while preserving profiler and ETW notifications.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tommcdon tommcdon added this to the 11.0.0 milestone Apr 18, 2026
@tommcdon tommcdon requested review from janvorli and noahfalk April 18, 2026 00:48
@tommcdon tommcdon self-assigned this Apr 18, 2026
Copilot AI review requested due to automatic review settings April 18, 2026 00:48
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
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 updates CoreCLR’s exception-handling callback path to avoid sending a debugger “ExceptionFilter” notification for the runtime-invoked managed UCO entrypoint (Environment.CallEntryPoint), preventing the debugger from intercepting before the filter evaluates and thereby preserving expected “unhandled exception” propagation behavior. Profiler and ETW notifications remain unchanged.

Changes:

  • Suppress EEToDebuggerExceptionInterfaceWrapper::ExceptionFilter(...) when the filter is in Environment.CallEntryPoint.
  • Keep existing profiler (ExceptionSearchFilterEnter) and ETW (ExceptionFilterBegin) events for the same path.

Comment thread src/coreclr/vm/exinfo.cpp Outdated
Copilot AI review requested due to automatic review settings April 18, 2026 01:01
Copy link
Copy Markdown
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks!

I assume that this was found by the concord tests?

Copy link
Copy Markdown
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread src/coreclr/vm/exinfo.cpp Outdated
Comment thread src/coreclr/vm/exinfo.cpp Outdated
Copilot AI review requested due to automatic review settings April 18, 2026 01:13
Copy link
Copy Markdown
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread src/coreclr/vm/exinfo.cpp Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 18, 2026 01:25
Copy link
Copy Markdown
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

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

@tommcdon
Copy link
Copy Markdown
Member Author

Thanks!

I assume that this was found by the concord tests?

Yes, this was internal debugger testing that caught this

@jkotas jkotas merged commit ba75e3d into dotnet:main Apr 18, 2026
111 of 113 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.

3 participants