[Local GC] Fix some interface violations#10817
Conversation
| // taken by a suspended thread. | ||
| FreeBuildDebugBreak(); | ||
| // Even in retail, stop in the debugger if available. | ||
| GCToOSInterface::DebugBreak(); |
There was a problem hiding this comment.
It looks like __FreeBuildDebugBreak (used in release builds) checks whether CLRConfig::INTERNAL_BreakOnRetailAssert is set, and does nothing if it isn't. Is this change in behavior intentional?
There was a problem hiding this comment.
Yeah, at least for now. In a future PR I'll be adding a mechanism by which we can query config values from the GC while build standalone, so we could choose do to that if we'd like. This is the only place in the GC that I found that honors BreakOnRetailAssert, though - all other places just call DebugBreak unconditionally and the process will die if there's no debugger attached.
There was a problem hiding this comment.
This code is under DETECT_DEADLOCK ifdef. This ifdef does not seem to be turned on, so it should not matter much what we do here.
Commit migrated from dotnet/coreclr@ea55c4a
This PR fixes two linker errors that arise when building the GC standalone:
_DebugBreakinGCHeap::WaitUntilGCComplete, replaced withGCToOSInterface::DebugBreakEEPOLICY_HANDLE_FATAL_ERRORinFATAL_GC_ERROR, replaced withGCToEEInterface::HandleFatalError.cc @Maoni0 @adityamandaleeka @sergiy-k @jkotas