From 9d415ce48e0f60360a89150aa1c771cba23819ed Mon Sep 17 00:00:00 2001 From: Tomas Date: Thu, 19 Nov 2020 10:15:23 +0100 Subject: [PATCH] Mark stress log critical section as compatible with shutdown Fixes: https://github.com/dotnet/runtime/issues/43571 --- src/coreclr/src/utilcode/stresslog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/src/utilcode/stresslog.cpp b/src/coreclr/src/utilcode/stresslog.cpp index 7d01fc09ca6bd..108080455d79f 100644 --- a/src/coreclr/src/utilcode/stresslog.cpp +++ b/src/coreclr/src/utilcode/stresslog.cpp @@ -151,7 +151,7 @@ void StressLog::Initialize(unsigned facilities, unsigned level, unsigned maxByt return; } - theLog.lock = ClrCreateCriticalSection(CrstStressLog,(CrstFlags)(CRST_UNSAFE_ANYMODE|CRST_DEBUGGER_THREAD)); + theLog.lock = ClrCreateCriticalSection(CrstStressLog,(CrstFlags)(CRST_UNSAFE_ANYMODE|CRST_DEBUGGER_THREAD|CRST_TAKEN_DURING_SHUTDOWN)); // StressLog::Terminate is going to free memory. if (maxBytesPerThread < STRESSLOG_CHUNK_SIZE) {