diff options
author | danmosemsft <danmose@microsoft.com> | 2017-02-10 22:15:01 -0800 |
---|---|---|
committer | danmosemsft <danmose@microsoft.com> | 2017-02-10 22:15:01 -0800 |
commit | 87f8b67a4ee90ef807927f5083e237cb88b34725 (patch) | |
tree | 2ad1316d160dd7746c20d1668f5e7a8bd2709bf3 /src/vm/exceptionhandling.cpp | |
parent | b45b7e4eb467bca44f9d77959df0337bdcecbd3c (diff) | |
download | coreclr-87f8b67a4ee90ef807927f5083e237cb88b34725.tar.gz coreclr-87f8b67a4ee90ef807927f5083e237cb88b34725.tar.bz2 coreclr-87f8b67a4ee90ef807927f5083e237cb88b34725.zip |
Revert "Remove always defined FEATURE_CORRUPTING_EXCEPTIONS"
This reverts commit b0dab0d6de90a38dfbf0d6b2039a7b8f5269d802.
Diffstat (limited to 'src/vm/exceptionhandling.cpp')
-rw-r--r-- | src/vm/exceptionhandling.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp index e48c648486..63192a2146 100644 --- a/src/vm/exceptionhandling.cpp +++ b/src/vm/exceptionhandling.cpp @@ -949,6 +949,7 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord !(dwExceptionFlags & EXCEPTION_UNWINDING), &STState); +#ifdef FEATURE_CORRUPTING_EXCEPTIONS // Only setup the Corruption Severity in the first pass if (!(dwExceptionFlags & EXCEPTION_UNWINDING)) { @@ -963,6 +964,7 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord CEHelper::ShouldTreatActiveExceptionAsNonCorrupting()); } } +#endif // FEATURE_CORRUPTING_EXCEPTIONS { // Switch to COOP mode since we are going to work @@ -2378,6 +2380,7 @@ CLRUnwindStatus ExceptionTracker::ProcessManagedCallFrame( if (fIsILStub && !fIsFunclet) // only make this callback on the main method body of IL stubs pUserMDForILStub = GetUserMethodForILStub(pThread, sf.SP, pMD, &pILStubFrame); +#ifdef FEATURE_CORRUPTING_EXCEPTIONS BOOL fCanMethodHandleException = TRUE; CorruptionSeverity currentSeverity = NotCorrupting; { @@ -2394,6 +2397,7 @@ CLRUnwindStatus ExceptionTracker::ProcessManagedCallFrame( currentSeverity = pThread->GetExceptionState()->GetCurrentExceptionTracker()->GetCorruptionSeverity(); fCanMethodHandleException = CEHelper::CanMethodHandleException(currentSeverity, pMDWithCEAttribute); } +#endif // FEATURE_CORRUPTING_EXCEPTIONS // Doing rude abort. Skip all non-constrained execution region code. // When rude abort is initiated, we cannot intercept any exceptions. @@ -2618,6 +2622,7 @@ CLRUnwindStatus ExceptionTracker::ProcessManagedCallFrame( EH_CLAUSE_ENUMERATOR EnumState; unsigned EHCount; +#ifdef FEATURE_CORRUPTING_EXCEPTIONS // The method cannot handle the exception (e.g. cannot handle the CE), then simply bail out // without examining the EH clauses in it. if (!fCanMethodHandleException) @@ -2631,6 +2636,7 @@ CLRUnwindStatus ExceptionTracker::ProcessManagedCallFrame( EHCount = 0; } else +#endif // FEATURE_CORRUPTING_EXCEPTIONS { EHCount = pJitMan->InitializeEHEnumeration(MethToken, &EnumState); } @@ -3884,6 +3890,7 @@ ExceptionTracker* ExceptionTracker::GetOrCreateTracker( } } +#ifdef FEATURE_CORRUPTING_EXCEPTIONS if (fCreateNewTracker) { // Exception tracker should be in the 2nd pass right now @@ -3895,6 +3902,7 @@ ExceptionTracker* ExceptionTracker::GetOrCreateTracker( // See comment in CEHelper::SetupCorruptionSeverityForActiveExceptionInUnwindPass for details CEHelper::SetupCorruptionSeverityForActiveExceptionInUnwindPass(pThread, pTracker, FALSE, pExceptionRecord->ExceptionCode); } +#endif // FEATURE_CORRUPTING_EXCEPTIONS } _ASSERTE(pTracker->m_pLimitFrame >= pThread->GetFrame()); @@ -4659,6 +4667,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) { @@ -4670,6 +4679,7 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHar pCurTES->SetLastActiveExceptionCorruptionSeverity(severity); } +#endif // FEATURE_CORRUPTING_EXCEPTIONS } throw std::move(ex); |