summaryrefslogtreecommitdiff
path: root/src/vm/i386
diff options
context:
space:
mode:
authorFilip Navara <filip.navara@gmail.com>2019-01-23 22:13:01 +0100
committerJan Kotas <jkotas@microsoft.com>2019-01-23 13:13:01 -0800
commita28b25aacdcd2adb0fdfa70bd869f53ba6565976 (patch)
treed37eeacbb212a5633edabf93300dbcd18980f13f /src/vm/i386
parent797888982e264e2ecfbc436f782f2f6704644e84 (diff)
downloadcoreclr-a28b25aacdcd2adb0fdfa70bd869f53ba6565976.tar.gz
coreclr-a28b25aacdcd2adb0fdfa70bd869f53ba6565976.tar.bz2
coreclr-a28b25aacdcd2adb0fdfa70bd869f53ba6565976.zip
Remove all traces of FEATURE_STACK_PROBE. (#22149)
Diffstat (limited to 'src/vm/i386')
-rw-r--r--src/vm/i386/cgenx86.cpp10
-rw-r--r--src/vm/i386/excepx86.cpp43
-rw-r--r--src/vm/i386/gmsx86.cpp2
-rw-r--r--src/vm/i386/jitinterfacex86.cpp8
4 files changed, 2 insertions, 61 deletions
diff --git a/src/vm/i386/cgenx86.cpp b/src/vm/i386/cgenx86.cpp
index f9e7c2bc16..45ac5272b0 100644
--- a/src/vm/i386/cgenx86.cpp
+++ b/src/vm/i386/cgenx86.cpp
@@ -105,9 +105,6 @@ void GetSpecificCpuInfo(CORINFO_CPU * cpuInfo)
_ASSERTE(tempVal.dwCPUType);
#ifdef _DEBUG
- {
- SO_NOT_MAINLINE_REGION();
-
/* Set Family+Model+Stepping string (eg., x690 for Banias, or xF30 for P4 Prescott)
* instead of Family only
*/
@@ -120,15 +117,11 @@ void GetSpecificCpuInfo(CORINFO_CPU * cpuInfo)
assert((configCpuFamily & 0xFFF) == configCpuFamily);
tempVal.dwCPUType = (tempVal.dwCPUType & 0xFFFF0000) | configCpuFamily;
}
- }
#endif
tempVal.dwFeatures = GetSpecificCpuFeaturesAsm(&tempVal.dwExtendedFeatures); // written in ASM & doesn't participate in contracts
#ifdef _DEBUG
- {
- SO_NOT_MAINLINE_REGION();
-
/* Set the 32-bit feature mask
*/
@@ -139,7 +132,6 @@ void GetSpecificCpuInfo(CORINFO_CPU * cpuInfo)
{
tempVal.dwFeatures = configCpuFeatures;
}
- }
#endif
val = *cpuInfo = tempVal;
@@ -910,7 +902,6 @@ WORD GetUnpatchedCodeData(LPCBYTE pAddr)
GC_NOTRIGGER;
PRECONDITION(CORDebuggerAttached());
PRECONDITION(CheckPointer(pAddr));
- SO_TOLERANT;
} CONTRACT_END;
// Ordering is because x86 is little-endien.
@@ -1480,7 +1471,6 @@ BOOL DoesSlotCallPrestub(PCODE pCode)
CONTRACTL {
NOTHROW;
GC_NOTRIGGER;
- SO_TOLERANT;
PRECONDITION(pCode != NULL);
PRECONDITION(pCode != GetPreStubEntryPoint());
} CONTRACTL_END;
diff --git a/src/vm/i386/excepx86.cpp b/src/vm/i386/excepx86.cpp
index 97b4087797..c837b55b2a 100644
--- a/src/vm/i386/excepx86.cpp
+++ b/src/vm/i386/excepx86.cpp
@@ -475,10 +475,6 @@ EXCEPTION_DISPOSITION COMPlusAfterUnwind(
LOG((LF_EH, LL_INFO1000, "COMPlusAfterUnwind: going to: pFunc:%#X, pStack:%#X\n",
tct.pFunc, tct.pStack));
- // TODO: UnwindFrames ends up calling into StackWalkFrames which is SO_INTOLERANT
- // as is UnwindFrames, etc... Should we make COMPlusAfterUnwind SO_INTOLERANT???
- ANNOTATION_VIOLATION(SOToleranceViolation);
-
UnwindFrames(pThread, &tct);
#ifdef DEBUGGING_SUPPORTED
@@ -649,7 +645,6 @@ CPFH_RealFirstPassHandler( // ExceptionContinueSearch, etc.
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
STATIC_CONTRACT_MODE_COOPERATIVE;
- STATIC_CONTRACT_SO_TOLERANT;
#ifdef _DEBUG
static int breakOnFirstPass = -1;
@@ -1079,7 +1074,6 @@ CPFH_RealFirstPassHandler( // ExceptionContinueSearch, etc.
#ifdef FEATURE_CORRUPTING_EXCEPTIONS
{
- BEGIN_SO_INTOLERANT_CODE(GetThread());
// Setup the state in current exception tracker indicating the corruption severity
// of the active exception.
CEHelper::SetupCorruptionSeverityForActiveException(bRethrownException, bNestedException,
@@ -1088,8 +1082,6 @@ CPFH_RealFirstPassHandler( // ExceptionContinueSearch, etc.
// Failfast if exception indicates corrupted process state
if (pExInfo->GetCorruptionSeverity() == ProcessCorrupting)
EEPOLICY_HANDLE_FATAL_ERROR(exceptionCode);
-
- END_SO_INTOLERANT_CODE;
}
#endif // FEATURE_CORRUPTING_EXCEPTIONS
@@ -1146,10 +1138,7 @@ CPFH_RealFirstPassHandler( // ExceptionContinueSearch, etc.
if (bRethrownException || bNestedException)
{
_ASSERTE(pExInfo->m_pPrevNestedInfo != NULL);
-
- BEGIN_SO_INTOLERANT_CODE(GetThread());
SetStateForWatsonBucketing(bRethrownException, pExInfo->GetPreviousExceptionTracker()->GetThrowableAsHandle());
- END_SO_INTOLERANT_CODE;
}
#ifdef DEBUGGING_SUPPORTED
@@ -1708,7 +1697,7 @@ EXCEPTION_HANDLER_IMPL(COMPlusFrameHandler)
Thread *pThread = GetThread();
if ((pExceptionRecord->ExceptionFlags & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND)) == 0)
{
- if (IsSOExceptionCode(pExceptionRecord->ExceptionCode))
+ if (pExceptionRecord->ExceptionCode == STATUS_STACK_OVERFLOW)
{
EEPolicy::HandleStackOverflow(SOD_ManagedFrameHandler, (void*)pEstablisherFrame);
@@ -1736,15 +1725,6 @@ EXCEPTION_HANDLER_IMPL(COMPlusFrameHandler)
return ExceptionContinueSearch;
}
- else
- {
-#ifdef FEATURE_STACK_PROBE
- if (GetEEPolicy()->GetActionOnFailure(FAIL_StackOverflow) == eRudeUnloadAppDomain)
- {
- RetailStackProbe(static_cast<unsigned int>(ADJUST_PROBE(BACKOUT_CODE_STACK_LIMIT)), pThread);
- }
-#endif
- }
}
else
{
@@ -1758,7 +1738,7 @@ EXCEPTION_HANDLER_IMPL(COMPlusFrameHandler)
exceptionCode = GetCurrentExceptionCode();
}
- if (IsSOExceptionCode(exceptionCode))
+ if (exceptionCode == STATUS_STACK_OVERFLOW)
{
// We saved the context during the first pass in case the stack overflow exception is
// unhandled and Watson dump code needs it. Now we are in the second pass, therefore
@@ -1799,9 +1779,6 @@ EXCEPTION_HANDLER_IMPL(COMPlusFrameHandler)
}
}
- // <TODO> . We need to probe here, but can't introduce destructors etc. </TODO>
- BEGIN_CONTRACT_VIOLATION(SOToleranceViolation);
-
if (pExceptionRecord->ExceptionFlags & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND))
{
retVal = CPFH_UnwindHandler(pExceptionRecord,
@@ -1823,8 +1800,6 @@ EXCEPTION_HANDLER_IMPL(COMPlusFrameHandler)
}
- END_CONTRACT_VIOLATION;
-
return retVal;
} // COMPlusFrameHandler()
@@ -1839,7 +1814,6 @@ NOINLINE LPVOID COMPlusEndCatchWorker(Thread * pThread)
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
STATIC_CONTRACT_MODE_COOPERATIVE;
- STATIC_CONTRACT_SO_INTOLERANT;
LOG((LF_EH, LL_INFO1000, "COMPlusPEndCatch:called with "
"pThread:0x%x\n",pThread));
@@ -1850,9 +1824,6 @@ NOINLINE LPVOID COMPlusEndCatchWorker(Thread * pThread)
void* esp = NULL;
- // @todo . We need to probe in the EH code, but can't introduce destructors etc.
- BEGIN_CONTRACT_VIOLATION(SOToleranceViolation);
-
// Notify the profiler that the catcher has finished running
// IL stubs don't contain catch blocks so inability to perform this check does not matter.
// if (!pFunc->IsILStub())
@@ -1905,8 +1876,6 @@ NOINLINE LPVOID COMPlusEndCatchWorker(Thread * pThread)
pThread->SyncManagedExceptionState(fIsDebuggerHelperThread);
LOG((LF_EH, LL_INFO1000, "COMPlusPEndCatch: esp=%p\n", esp));
-
- END_CONTRACT_VIOLATION;
return esp;
}
@@ -1929,7 +1898,6 @@ LPVOID STDCALL COMPlusEndCatch(LPVOID ebp, DWORD ebx, DWORD edi, DWORD esi, LPVO
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
STATIC_CONTRACT_MODE_COOPERATIVE;
- STATIC_CONTRACT_SO_INTOLERANT;
ETW::ExceptionLog::ExceptionCatchEnd();
ETW::ExceptionLog::ExceptionThrownEnd();
@@ -2066,7 +2034,6 @@ VOID UnwindExceptionTrackerAndResumeInInterceptionFrame(ExInfo* pExInfo, EHConte
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_MODE_COOPERATIVE;
- STATIC_CONTRACT_SO_TOLERANT;
_ASSERTE(pExInfo && context);
@@ -2088,7 +2055,6 @@ BOOL PopNestedExceptionRecords(LPVOID pTargetSP, BOOL bCheckForUnknownHandlers)
// No CONTRACT here, because we can't run the risk of it pushing any SEH into the current method.
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_SO_TOLERANT;
PEXCEPTION_REGISTRATION_RECORD pEHR = GetCurrentSEHRecord();
@@ -3301,7 +3267,6 @@ int CallJitEHFilterWorker(size_t *pShadowSP, EHContext *pContext)
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
STATIC_CONTRACT_MODE_COOPERATIVE;
- STATIC_CONTRACT_SO_INTOLERANT;
int retVal = EXCEPTION_CONTINUE_SEARCH;
@@ -3554,8 +3519,6 @@ EXCEPTION_HANDLER_IMPL(UMThunkPrestubHandler)
EXCEPTION_DISPOSITION retval = ExceptionContinueSearch;
- BEGIN_CONTRACT_VIOLATION(SOToleranceViolation);
-
// We must forward to the COMPlusFrameHandler. This will unwind the Frame Chain up to here, and also leave the
// preemptive GC mode set correctly.
retval = EXCEPTION_HANDLER_FWD(COMPlusFrameHandler);
@@ -3582,8 +3545,6 @@ EXCEPTION_HANDLER_IMPL(UMThunkPrestubHandler)
pFrame->Pop(pThread);
}
- END_CONTRACT_VIOLATION;
-
return retval;
}
diff --git a/src/vm/i386/gmsx86.cpp b/src/vm/i386/gmsx86.cpp
index 53bd23fba2..94843b061a 100644
--- a/src/vm/i386/gmsx86.cpp
+++ b/src/vm/i386/gmsx86.cpp
@@ -369,7 +369,6 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState,
CONTRACTL {
NOTHROW;
GC_NOTRIGGER;
- SO_TOLERANT;
SUPPORTS_DAC;
} CONTRACTL_END;
@@ -1283,7 +1282,6 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState,
CONTRACTL {
NOTHROW;
GC_NOTRIGGER;
- SO_TOLERANT;
SUPPORTS_DAC;
} CONTRACTL_END;
diff --git a/src/vm/i386/jitinterfacex86.cpp b/src/vm/i386/jitinterfacex86.cpp
index 7be22f79a5..78401d85e0 100644
--- a/src/vm/i386/jitinterfacex86.cpp
+++ b/src/vm/i386/jitinterfacex86.cpp
@@ -68,7 +68,6 @@ extern "C" void STDCALL JIT_WriteBarrierReg_PostGrow();// JIThelp.asm/JIThelp.s
#ifdef _DEBUG
extern "C" void STDCALL WriteBarrierAssert(BYTE* ptr, Object* obj)
{
- STATIC_CONTRACT_SO_TOLERANT;
WRAPPER_NO_CONTRACT;
static BOOL fVerifyHeap = -1;
@@ -103,7 +102,6 @@ extern "C" void STDCALL WriteBarrierAssert(BYTE* ptr, Object* obj)
__declspec(naked) void F_CALL_CONV JIT_Stelem_Ref(PtrArray* array, unsigned idx, Object* val)
{
- STATIC_CONTRACT_SO_TOLERANT;
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
@@ -197,7 +195,6 @@ Epilog:
extern "C" __declspec(naked) Object* F_CALL_CONV JIT_IsInstanceOfClass(MethodTable *pMT, Object *pObject)
{
- STATIC_CONTRACT_SO_TOLERANT;
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
@@ -256,7 +253,6 @@ extern "C" __declspec(naked) Object* F_CALL_CONV JIT_IsInstanceOfClass(MethodTab
extern "C" __declspec(naked) Object* F_CALL_CONV JIT_ChkCastClass(MethodTable *pMT, Object *pObject)
{
- STATIC_CONTRACT_SO_TOLERANT;
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
@@ -296,7 +292,6 @@ extern "C" __declspec(naked) Object* F_CALL_CONV JIT_ChkCastClass(MethodTable *p
extern "C" __declspec(naked) Object* F_CALL_CONV JIT_ChkCastClassSpecial(MethodTable *pMT, Object *pObject)
{
- STATIC_CONTRACT_SO_TOLERANT;
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
@@ -378,7 +373,6 @@ void STDCALL JIT_TailCallHelper(Thread * pThread)
CONTRACTL {
NOTHROW;
GC_NOTRIGGER;
- SO_TOLERANT;
} CONTRACTL_END;
pThread->UnhijackThread();
@@ -783,7 +777,6 @@ HCIMPL2_RAW(Object*, UnframedAllocateObjectArray, MethodTable *pArrayMT, DWORD c
THROWS;
GC_TRIGGERS;
MODE_COOPERATIVE;
- SO_INTOLERANT;
} CONTRACTL_END;
return OBJECTREFToObject(AllocateArrayEx(pArrayMT,
@@ -804,7 +797,6 @@ HCIMPL2_RAW(Object*, UnframedAllocatePrimitiveArray, CorElementType type, DWORD
THROWS;
GC_TRIGGERS;
MODE_COOPERATIVE;
- SO_INTOLERANT;
} CONTRACTL_END;
return OBJECTREFToObject( AllocatePrimitiveArray(type, cElements, FALSE) );