diff --git a/src/coreclr/vm/exceptionhandling.cpp b/src/coreclr/vm/exceptionhandling.cpp index 00f6db4a17d612..8beb5ac9eb722e 100644 --- a/src/coreclr/vm/exceptionhandling.cpp +++ b/src/coreclr/vm/exceptionhandling.cpp @@ -3992,12 +3992,27 @@ CLR_BOOL SfiNextWorker(StackFrameIterator* pThis, uint* uExCollideClauseIdx, CLR EH_LOG((LL_INFO100, "SfiNext: current frame is filter funclet\n")); isPropagatingToNativeCode = TRUE; } +#ifdef FEATURE_INTERPRETER + // Detect interpreter-to-native transition past the last interpreted frame. + else if (codeInfo.IsInterpretedCode()) + { + EH_LOG((LL_INFO100, "SfiNext: native transition past last interpreter frame\n")); + isPropagatingToNativeCode = TRUE; + } +#endif // FEATURE_INTERPRETER } if (isPropagatingToNativeCode) { pFrame = pThis->m_crawl.GetFrame(); +#ifdef FEATURE_INTERPRETER + if (pFrame != FRAME_TOP && pFrame->GetFrameIdentifier() == FrameIdentifier::InterpreterFrame) + { + pFrame = pFrame->PtrNextFrame(); + } +#endif // FEATURE_INTERPRETER + // Check if there are any further managed frames on the stack or a catch for all exceptions in native code (marked by // DebuggerU2MCatchHandlerFrame with CatchesAllExceptions() returning true). // If not, the exception is unhandled.