From 886bd1a9ac154f5505fa14b9077a0d29f610ea2e Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Thu, 24 Apr 2025 15:57:03 -0700 Subject: [PATCH] Fix minidump generation - missing IP for exception stack frames This was caused by changes in PR https://github.com/dotnet/runtime/pull/114582 where Exception::GetStackTrace called GetThread() which throws an error exception in the DAC. Changed the enummem.cpp code in ClrDataAccess::DumpManagedExcepObject() to call the GetStackTrace overload that allows a NULL pCurrentThread parameter to be passed. --- src/coreclr/debug/daccess/enummem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/debug/daccess/enummem.cpp b/src/coreclr/debug/daccess/enummem.cpp index 9e46344b97c7f5..95d401caa0daa9 100644 --- a/src/coreclr/debug/daccess/enummem.cpp +++ b/src/coreclr/debug/daccess/enummem.cpp @@ -561,7 +561,7 @@ HRESULT ClrDataAccess::DumpManagedExcepObject(CLRDataEnumMemoryFlags flags, OBJE // included in the dump. When we touch the header and each element looking for the // MD this happens. StackTraceArray stackTrace; - exceptRef->GetStackTrace(stackTrace); + exceptRef->GetStackTrace(stackTrace, /*outKeepAliveArray*/ NULL, /* pCurrentThread */ NULL); // The stackTraceArrayObj can be either a byte[] with the actual stack trace array or an object[] where the first element is the actual stack trace array. // In case it was the latter, we need to dump the actual stack trace array object here too.