#define NULL_AREA_SIZE GetOsPageSize()
#endif // !TARGET_UNIX
-
-BOOL IsIPInEE(void *ip);
-
//----------------------------------------------------------------------------
//
// IsExceptionFromManagedCode - determine if pExceptionRecord points to a managed exception
GCStress<cfg_instr>::IsEnabled() &&
pExceptionRecord->ExceptionInformation[0] == 0 &&
pExceptionRecord->ExceptionInformation[1] == ~0 &&
- pThread->GetLastAVAddress() != (LPVOID)GetIP(pContext) &&
- !IsIPInEE((LPVOID)GetIP(pContext)))
+ pThread->GetLastAVAddress() != (LPVOID)GetIP(pContext))
{
pThread->SetLastAVAddress((LPVOID)GetIP(pContext));
return true;
#endif // !TARGET_UNIX
-BOOL IsIPInEE(void *ip)
-{
- WRAPPER_NO_CONTRACT;
-
- return FALSE;
-}
-
#if defined(FEATURE_HIJACK) && (!defined(TARGET_X86) || defined(TARGET_UNIX))
// This function is used to check if the specified IP is in the prolog or not.
}
}
-
- // Also check if the exception was in the EE or not
- BOOL fExceptionInEE = FALSE;
- if (!pThread)
- {
- // Check if the exception was in EE only if Thread object isnt available.
- // This will save us from unnecessary checks
- fExceptionInEE = IsIPInEE(pExceptionInfo->ExceptionRecord->ExceptionAddress);
- }
-
// We are going to process the exception only if one of the following conditions is true:
//
// 1) We have a valid Thread object (implies exception on managed thread)
- // 2) Not a valid Thread object but the IP is in the execution engine (implies native thread within EE faulted)
// 3) The exception occurred in a GC marked location when no thread exists (i.e. reverse P/Invoke with UnmanagedCallersOnlyAttribute).
- if (pThread || fExceptionInEE)
+ if (pThread)
{
if (!bIsGCMarker)
{
// If Frame chain is corrupted, we may get AV while accessing frames, and this function will be
// called recursively. We use Frame chain to limit our search range. It is not disaster if we
// can not use it.
- if (!(dwCode == STATUS_ACCESS_VIOLATION &&
- IsIPInEE(pExceptionInfo->ExceptionRecord->ExceptionAddress)))
+ // Find the stop point (most jitted function)
+ Frame* pFrame = pThread->GetFrame();
+ for(;;)
{
- // Find the stop point (most jitted function)
- Frame* pFrame = pThread->GetFrame();
- for(;;)
- {
- // skip GC frames
- if (pFrame == 0 || pFrame == (Frame*) -1)
- break;
+ // skip GC frames
+ if (pFrame == 0 || pFrame == (Frame*) -1)
+ break;
- Frame::ETransitionType type = pFrame->GetTransitionType();
- if (type == Frame::TT_M2U || type == Frame::TT_InternalCall)
- {
- stopPoint = pFrame;
- break;
- }
- pFrame = pFrame->Next();
+ Frame::ETransitionType type = pFrame->GetTransitionType();
+ if (type == Frame::TT_M2U || type == Frame::TT_InternalCall)
+ {
+ stopPoint = pFrame;
+ break;
}
+ pFrame = pFrame->Next();
}
STRESS_LOG0(LF_EH, LL_INFO100, "CLRVectoredExceptionHandlerShim: stack");
while (count < 20 && sp < stopPoint)
{
- if (IsIPInEE((BYTE*)*sp))
- {
- STRESS_LOG1(LF_EH, LL_INFO100, "%pK\n", *sp);
- count ++;
- }
sp += 1;
}
}