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) {