Skip to content

Commit 0f6284e

Browse files
Fix hang caused by calling Environment.FailFast on multiple threads (#72567)
Fixes #72565 Co-authored-by: Jan Kotas <jkotas@microsoft.com>
1 parent 9f96fed commit 0f6284e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/coreclr/vm/eepolicy.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ void LogInfoForFatalError(UINT exitCode, LPCWSTR pszMessage, LPCWSTR errorSource
361361
}
362362
else if (pPreviousThread != nullptr)
363363
{
364+
GCX_PREEMP(); // Avoid blocking other threads that may be trying to suspend the runtime
364365
while (s_pCrashingThread != FatalErrorLoggingFinished)
365366
{
366367
ClrSleepEx(50, /*bAlertable*/ FALSE);

0 commit comments

Comments
 (0)