Skip to content

Commit

Permalink
Fix recursion issue found in 109779
Browse files Browse the repository at this point in the history
  • Loading branch information
mikem8361 committed Dec 4, 2024
1 parent 48e3f13 commit d268900
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/coreclr/pal/src/thread/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d268900

Please sign in to comment.