From 421922d5cadbe3d2cd0d0add55c0dd5bd4c361fe Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Fri, 2 Feb 2024 01:15:33 +0100 Subject: [PATCH] Attempt to fix Win7 x86 crash And a bit of cleanup --- src/coreclr/vm/excep.cpp | 3 ++- src/coreclr/vm/stackwalk.cpp | 12 ------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/coreclr/vm/excep.cpp b/src/coreclr/vm/excep.cpp index c0001e50dc704..e723e087d57f4 100644 --- a/src/coreclr/vm/excep.cpp +++ b/src/coreclr/vm/excep.cpp @@ -6563,7 +6563,6 @@ void HandleManagedFaultNew(EXCEPTION_RECORD* pExceptionRecord, CONTEXT* pContext #if defined(FEATURE_EH_FUNCLETS) *frame->GetGSCookiePtr() = GetProcessGSCookie(); #endif // FEATURE_EH_FUNCLETS - //pContext->ContextFlags |= CONTEXT_EXCEPTION_ACTIVE; frame->InitAndLink(pContext); Thread *pThread = GetThread(); @@ -7447,7 +7446,9 @@ LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo) return EXCEPTION_CONTINUE_SEARCH; } +#ifdef FEATURE_EH_FUNCLETS pExceptionInfo->ContextRecord->ContextFlags |= CONTEXT_EXCEPTION_ACTIVE; +#endif // FEATURE_EH_FUNCLETS // WARNING // diff --git a/src/coreclr/vm/stackwalk.cpp b/src/coreclr/vm/stackwalk.cpp index 14981b1613fa2..cd971db4236f2 100644 --- a/src/coreclr/vm/stackwalk.cpp +++ b/src/coreclr/vm/stackwalk.cpp @@ -1407,12 +1407,6 @@ BOOL StackFrameIterator::ResetRegDisp(PREGDISPLAY pRegDisp, } m_crawl.pFrame->UpdateRegDisplay(m_crawl.pRD, m_flags & UNWIND_FLOATS); -// #ifdef FEATURE_EH_FUNCLETS -// if ((m_crawl.pRD->pCurrentContext->ContextFlags & CONTEXT_EXCEPTION_ACTIVE) == 0) -// { -// m_crawl.hasFaulted = false; -// } -// #endif // FEATURE_EH_FUNCLETS _ASSERTE(curPc == GetControlPC(m_crawl.pRD)); } @@ -2733,12 +2727,6 @@ StackWalkAction StackFrameIterator::NextRaw(void) if (m_crawl.isFrameless) { m_crawl.pFrame->UpdateRegDisplay(m_crawl.pRD, m_flags & UNWIND_FLOATS); -// #ifdef FEATURE_EH_FUNCLETS -// if ((m_crawl.pRD->pCurrentContext->ContextFlags & CONTEXT_EXCEPTION_ACTIVE) == 0) -// { -// m_crawl.hasFaulted = false; -// } -// #endif // FEATURE_EH_FUNCLETS #if defined(RECORD_RESUMABLE_FRAME_SP) CONSISTENCY_CHECK(NULL == m_pvResumableFrameTargetSP);