diff --git a/src/coreclr/pal/src/thread/process.cpp b/src/coreclr/pal/src/thread/process.cpp index 2e22f22b5ae6e..a2239e8b8281b 100644 --- a/src/coreclr/pal/src/thread/process.cpp +++ b/src/coreclr/pal/src/thread/process.cpp @@ -2228,8 +2228,11 @@ PROCCreateCrashDump( size_t previousThreadId = InterlockedCompareExchange(&g_crashingThreadId, currentThreadId, 0); if (previousThreadId != 0) { - // Should never reenter or recurse - _ASSERTE(previousThreadId != currentThreadId); + // Return error if reenter this code + if (previousThreadId == currentThreadId) + { + return false; + } // The first thread generates the crash info and any other threads are blocked while (true)