// this thread will bypass all our locks.
Thread *pThread = GetThread();
+ if (pThread)
+ {
+ // Fiber-friendly Vectored Exception Handling:
+ // Check if the current and the cached stack-base match.
+ // If they don't match then probably the thread is running on a different Fiber
+ // than during the initialization of the Thread-object.
+ void* stopPoint = pThread->GetCachedStackBase();
+ void* currentStackBase = Thread::GetStackUpperBound();
+ if (currentStackBase != stopPoint)
+ {
+ CantAllocHolder caHolder;
+ STRESS_LOG2(LF_EH, LL_INFO100, "In CLRVectoredExceptionHandler: mismatch of cached and current stack-base indicating use of Fibers, return with EXCEPTION_CONTINUE_SEARCH: current = %p; cache = %p\n",
+ currentStackBase, stopPoint);
+ return EXCEPTION_CONTINUE_SEARCH;
+ }
+ }
+
+
// Also check if the exception was in the EE or not
BOOL fExceptionInEE = FALSE;
if (!pThread)