Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/coreclr/vm/excep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6779,15 +6779,15 @@ VEH_ACTION WINAPI CLRVectoredExceptionHandlerPhase3(PEXCEPTION_POINTERS pExcepti
// the subsequent logic here sees a managed fault.
//
// On 64-bit, some additional work is required..
#ifdef FEATURE_EH_FUNCLETS
pContext->ContextFlags &= ~CONTEXT_EXCEPTION_ACTIVE;
#ifdef FEATURE_EH_FUNCLETS
return VEH_EXECUTE_HANDLE_MANAGED_EXCEPTION;
#endif // defined(FEATURE_EH_FUNCLETS)
}
else if (AdjustContextForVirtualStub(pExceptionRecord, pContext))
{
#ifdef FEATURE_EH_FUNCLETS
pContext->ContextFlags &= ~CONTEXT_EXCEPTION_ACTIVE;
#ifdef FEATURE_EH_FUNCLETS
return VEH_EXECUTE_HANDLE_MANAGED_EXCEPTION;
#endif
}
Expand Down Expand Up @@ -7118,9 +7118,7 @@ LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo)
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING
//

#ifdef FEATURE_EH_FUNCLETS
pExceptionInfo->ContextRecord->ContextFlags |= CONTEXT_EXCEPTION_ACTIVE;
#endif // FEATURE_EH_FUNCLETS

// WARNING
//
Expand Down
11 changes: 10 additions & 1 deletion src/coreclr/vm/stackwalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3207,8 +3207,17 @@ void StackFrameIterator::PostProcessingForNoFrameTransition()

// Flags the same as from a FaultingExceptionFrame.
m_crawl.isInterrupted = true;
m_crawl.hasFaulted = true;
m_crawl.hasFaulted = (pContext->ContextFlags & CONTEXT_EXCEPTION_ACTIVE) != 0;
m_crawl.isIPadjusted = false;
if (!m_crawl.hasFaulted)
{
// If the context is from a hardware exception that happened in a helper where we have unwound
// the exception location to the caller of the helper, the frame needs to be marked as not
// being the first one. The COMPlusThrowCallback uses this information to decide whether
// the current IP should or should not be included in the try region range. The call to
// the helper that has fired the exception may be the last instruction in the try region.
m_crawl.isFirst = false;
}

#if defined(STACKWALKER_MAY_POP_FRAMES)
// If Frames would be unlinked from the Frame chain, also reset the UseExInfoForStackwalk bit
Expand Down
Loading