Skip to content

Commit

Permalink
Fix hang caused by calling Environment.FailFast on multiple threads (#…
Browse files Browse the repository at this point in the history
…72567)

Fixes #72565

Co-authored-by: Jan Kotas <[email protected]>
  • Loading branch information
github-actions[bot] and jkotas authored Aug 12, 2022
1 parent 9f96fed commit 0f6284e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/coreclr/vm/eepolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ void LogInfoForFatalError(UINT exitCode, LPCWSTR pszMessage, LPCWSTR errorSource
}
else if (pPreviousThread != nullptr)
{
GCX_PREEMP(); // Avoid blocking other threads that may be trying to suspend the runtime
while (s_pCrashingThread != FatalErrorLoggingFinished)
{
ClrSleepEx(50, /*bAlertable*/ FALSE);
Expand Down

0 comments on commit 0f6284e

Please sign in to comment.