From 0da56d3445c7355e1d8a3748b691e34afa9a33a4 Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Fri, 7 Apr 2017 23:59:00 -0700 Subject: [PATCH] [Local GC] Fix some interface violations (dotnet/coreclr#10817) Commit migrated from https://github.com/dotnet/coreclr/commit/ea55c4a25945d8ccb39d686b89f1fa729b4ebe23 --- src/coreclr/src/gc/env/gcenv.base.h | 1 + src/coreclr/src/gc/gcee.cpp | 8 ++------ src/coreclr/src/gc/gcpriv.h | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/coreclr/src/gc/env/gcenv.base.h b/src/coreclr/src/gc/env/gcenv.base.h index 2ce07ef..a4befca 100644 --- a/src/coreclr/src/gc/env/gcenv.base.h +++ b/src/coreclr/src/gc/env/gcenv.base.h @@ -65,6 +65,7 @@ inline HRESULT HRESULT_FROM_WIN32(unsigned long x) #define E_UNEXPECTED 0x8000FFFF #define E_NOTIMPL 0x80004001 #define E_INVALIDARG 0x80070057 +#define COR_E_EXECUTIONENGINE 0x80131506 #define NOERROR 0x0 #define ERROR_TIMEOUT 1460 diff --git a/src/coreclr/src/gc/gcee.cpp b/src/coreclr/src/gc/gcee.cpp index a736a59..889f940 100644 --- a/src/coreclr/src/gc/gcee.cpp +++ b/src/coreclr/src/gc/gcee.cpp @@ -408,12 +408,8 @@ BlockAgain: dwWaitResult = WaitForGCEvent->Wait(DETECT_DEADLOCK_TIMEOUT, FALSE ); if (dwWaitResult == WAIT_TIMEOUT) { - // Even in retail, stop in the debugger if available. Ideally, the - // following would use DebugBreak, but debspew.h makes this a null - // macro in retail. Note that in debug, we don't use the debspew.h - // macros because these take a critical section that may have been - // taken by a suspended thread. - FreeBuildDebugBreak(); + // Even in retail, stop in the debugger if available. + GCToOSInterface::DebugBreak(); goto BlockAgain; } diff --git a/src/coreclr/src/gc/gcpriv.h b/src/coreclr/src/gc/gcpriv.h index 7bd6883..108045c 100644 --- a/src/coreclr/src/gc/gcpriv.h +++ b/src/coreclr/src/gc/gcpriv.h @@ -28,7 +28,7 @@ inline void FATAL_GC_ERROR() GCToOSInterface::DebugBreak(); #endif // DACCESS_COMPILE _ASSERTE(!"Fatal Error in GC."); - EEPOLICY_HANDLE_FATAL_ERROR(COR_E_EXECUTIONENGINE); + GCToEEInterface::HandleFatalError(COR_E_EXECUTIONENGINE); } #ifdef _MSC_VER -- 2.7.4