diff options
Diffstat (limited to 'src/vm/excep.cpp')
-rw-r--r-- | src/vm/excep.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp index 17919701fe..019ec2543d 100644 --- a/src/vm/excep.cpp +++ b/src/vm/excep.cpp @@ -8017,11 +8017,11 @@ LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo) // // WARNING: This function could potentially throw an exception, however it should only // be able to do so when an interop debugger is attached - if(g_pDebugInterface != NULL) + if (g_pDebugInterface != NULL) { - if(g_pDebugInterface->FirstChanceSuspendHijackWorker(pExceptionInfo->ContextRecord, + if (g_pDebugInterface->FirstChanceSuspendHijackWorker(pExceptionInfo->ContextRecord, pExceptionInfo->ExceptionRecord) == EXCEPTION_CONTINUE_EXECUTION) - return EXCEPTION_CONTINUE_EXECUTION; + return EXCEPTION_CONTINUE_EXECUTION; } #endif @@ -8041,6 +8041,12 @@ LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo) } #endif + if (NtCurrentTeb()->ThreadLocalStoragePointer == NULL) + { + // Ignore exceptions early during thread startup before the thread is fully initialized by the OS + return EXCEPTION_CONTINUE_SEARCH; + } + bool bIsGCMarker = false; #ifdef USE_REDIRECT_FOR_GCSTRESS |