From 1f314a74c3538e6a1acafaa26980300441091464 Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Mon, 9 Jan 2017 20:51:44 +0900 Subject: [PATCH] Add two missing #ifdef related with FEATURE_CORRUPTING_EXCEPTIONS (dotnet/coreclr#8850) Commit migrated from https://github.com/dotnet/coreclr/commit/727481c54d38b12a230fec46052c2d55c9fc3b05 --- src/coreclr/src/vm/excep.cpp | 4 +++- src/coreclr/src/vm/exceptionhandling.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/coreclr/src/vm/excep.cpp b/src/coreclr/src/vm/excep.cpp index 5a6f7c6..1d24237 100644 --- a/src/coreclr/src/vm/excep.cpp +++ b/src/coreclr/src/vm/excep.cpp @@ -8986,11 +8986,13 @@ LONG ReflectionInvocationExceptionFilter( #else // !(_WIN64 || _TARGET_X86_) #error Unsupported platform #endif // _WIN64 - + +#ifdef FEATURE_CORRUPTING_EXCEPTIONS if (pEHTracker->GetCorruptionSeverity() == ProcessCorrupting) { EEPolicy::HandleFatalError(COR_E_FAILFAST, reinterpret_cast(pExceptionInfo->ExceptionRecord->ExceptionAddress), NULL, pExceptionInfo); } +#endif // FEATURE_CORRUPTING_EXCEPTIONS } return ret; diff --git a/src/coreclr/src/vm/exceptionhandling.cpp b/src/coreclr/src/vm/exceptionhandling.cpp index 1a839be..56c784a 100644 --- a/src/coreclr/src/vm/exceptionhandling.cpp +++ b/src/coreclr/src/vm/exceptionhandling.cpp @@ -4662,6 +4662,7 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHar ThreadExceptionState * pCurTES = pCurThread->GetExceptionState(); _ASSERTE(pCurTES != NULL); +#ifdef FEATURE_CORRUPTING_EXCEPTIONS ExceptionTracker* pEHTracker = pCurTES->GetCurrentExceptionTracker(); if (pEHTracker == NULL) { @@ -4673,6 +4674,7 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHar pCurTES->SetLastActiveExceptionCorruptionSeverity(severity); } +#endif // FEATURE_CORRUPTING_EXCEPTIONS } throw std::move(ex); -- 2.7.4