diff --git a/src/coreclr/vm/interpexec.cpp b/src/coreclr/vm/interpexec.cpp index 914f16a995d11d..f06762af1b65b6 100644 --- a/src/coreclr/vm/interpexec.cpp +++ b/src/coreclr/vm/interpexec.cpp @@ -644,7 +644,7 @@ void* DoGenericLookup(void* genericVarAsPtr, InterpGenericLookup* pLookup) } else { - assert(pLookup->lookupType == InterpGenericLookupType::Method); + _ASSERTE(pLookup->lookupType == InterpGenericLookupType::Method); pMD = (MethodDesc*)genericVarAsPtr; lookup = (uint8_t*)pMD; } @@ -742,7 +742,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr int8_t *stack; InterpMethod *pMethod = pFrame->startIp->Method; - assert(pMethod->CheckIntegrity()); + _ASSERTE(pMethod->CheckIntegrity()); pThreadContext->pStackPointer = pFrame->pStack + pMethod->allocaSize; stack = pFrame->pStack; @@ -812,7 +812,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr case INTOP_STORESTUBCONTEXT: { UMEntryThunkData* thunkData = GetMostRecentUMEntryThunkData(); - assert(thunkData); + _ASSERTE(thunkData); LOCAL_VAR(ip[1], void*) = thunkData; ip += 2; break; @@ -2443,7 +2443,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr pFrame->ip = ip; PCODE calliFunctionPointer = LOCAL_VAR(calliFunctionPointerVar, PCODE); - assert(calliFunctionPointer); + _ASSERTE(calliFunctionPointer); if (flags & (int32_t)CalliFlags::PInvoke) { @@ -2575,7 +2575,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr if (isTailcall) { // Move args from callArgsOffset to start of stack frame. - assert(pTargetMethod->CheckIntegrity()); + _ASSERTE(pTargetMethod->CheckIntegrity()); // It is safe to use memcpy because the source and destination are both on the interp stack, not in the GC heap. // We need to use the target method's argsSize, not our argsSize, because tail calls (unlike CEE_JMP) can have a // different signature from the caller. @@ -2603,7 +2603,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr } // Set execution state for the new frame pMethod = pFrame->startIp->Method; - assert(pMethod->CheckIntegrity()); + _ASSERTE(pMethod->CheckIntegrity()); stack = pFrame->pStack; ip = pFrame->startIp->GetByteCodes(); pThreadContext->pStackPointer = stack + pMethod->allocaSize; @@ -2691,7 +2691,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr { // Move args from callArgsOffset to start of stack frame. InterpMethod* pTargetMethod = targetIp->Method; - assert(pTargetMethod->CheckIntegrity()); + _ASSERTE(pTargetMethod->CheckIntegrity()); // It is safe to use memcpy because the source and destination are both on the interp stack, not in the GC heap. // We need to use the target method's argsSize, not our argsSize, because tail calls (unlike CEE_JMP) can have a // different signature from the caller. @@ -2724,7 +2724,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr // Set execution state for the new frame pMethod = pFrame->startIp->Method; - assert(pMethod->CheckIntegrity()); + _ASSERTE(pMethod->CheckIntegrity()); stack = pFrame->pStack; ip = pFrame->startIp->GetByteCodes(); pThreadContext->pStackPointer = stack + pMethod->allocaSize; @@ -2878,7 +2878,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr } case INTOP_LOAD_EXCEPTION: // This opcode loads the exception object coming from a catch / filter funclet caller to a variable. - assert(pExceptionClauseArgs != NULL); + _ASSERTE(pExceptionClauseArgs != NULL); LOCAL_VAR(ip[1], OBJECTREF) = pExceptionClauseArgs->throwable; ip += 2; break; @@ -3553,7 +3553,7 @@ do \ COMPlusThrow(kPlatformNotSupportedException); break; default: - assert(!"Unimplemented or invalid interpreter opcode"); + EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, W("Unimplemented or invalid interpreter opcode\n")); break; } } @@ -3589,7 +3589,7 @@ do \ stack = pFrame->pStack; pMethod = pFrame->startIp->Method; - assert(pMethod->CheckIntegrity()); + _ASSERTE(pMethod->CheckIntegrity()); pThreadContext->pStackPointer = pFrame->pStack + pMethod->allocaSize; pInterpreterFrame->SetIsFaulting(false); @@ -3608,7 +3608,7 @@ do \ ip = pFrame->ip; stack = pFrame->pStack; pMethod = pFrame->startIp->Method; - assert(pMethod->CheckIntegrity()); + _ASSERTE(pMethod->CheckIntegrity()); pFrame->ip = NULL; pThreadContext->pStackPointer = pFrame->pStack + pMethod->allocaSize;