Suppress debugger filter notification for UCO entrypoint during EH dispatch#127101
Conversation
…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>
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
There was a problem hiding this comment.
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 inEnvironment.CallEntryPoint. - Keep existing profiler (
ExceptionSearchFilterEnter) and ETW (ExceptionFilterBegin) events for the same path.
jkotas
left a comment
There was a problem hiding this comment.
Thanks!
I assume that this was found by the concord tests?
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Yes, this was internal debugger testing that caught this |
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.