Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2022-07-21 04:04:48 +0300
committergithub-actions <github-actions@github.com>2022-07-21 04:09:39 +0300
commit78b44eaa6d50f65522eed93f26dbab52bf2ede81 (patch)
tree235f42c5a05191df33a13fdb842350ece37379ae
parentf8bf0fcc30d2e1f606266db1b644266c7bdbf063 (diff)
Fix hang caused by calling Environment.FailFast on multiple threadsbackport/pr-72566-to-release/6.0
Fixes #72565
-rw-r--r--src/coreclr/vm/eepolicy.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/coreclr/vm/eepolicy.cpp b/src/coreclr/vm/eepolicy.cpp
index b9084568144..d9e81754ca2 100644
--- a/src/coreclr/vm/eepolicy.cpp
+++ b/src/coreclr/vm/eepolicy.cpp
@@ -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);