summaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2019-08-19 17:11:24 -0700
committerGitHub <noreply@github.com>2019-08-19 17:11:24 -0700
commit6d8482c379f67a00d63acd823ef351497a7bba4d (patch)
treea603dbb5745aea497aee1e27e454642e5510cc05 /src/debug
parentfc18c3d7f63b4507f4bf8144b2ee43e96ead0731 (diff)
downloadcoreclr-6d8482c379f67a00d63acd823ef351497a7bba4d.tar.gz
coreclr-6d8482c379f67a00d63acd823ef351497a7bba4d.tar.bz2
coreclr-6d8482c379f67a00d63acd823ef351497a7bba4d.zip
arm64 out of proc unwind for DAC (#26156)
Removed FEATURE_DATATARGET4 for arm64 Added SP check to createdump's native unwind loop to make it more robust. Issue: https://github.com/dotnet/coreclr/issues/15062
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/createdump/threadinfo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/debug/createdump/threadinfo.cpp b/src/debug/createdump/threadinfo.cpp
index f974b76677..02233c14dd 100644
--- a/src/debug/createdump/threadinfo.cpp
+++ b/src/debug/createdump/threadinfo.cpp
@@ -110,6 +110,8 @@ ReadMemoryAdapter(PVOID address, PVOID buffer, SIZE_T size)
void
ThreadInfo::UnwindNativeFrames(CrashInfo& crashInfo, CONTEXT* pContext)
{
+ uint64_t previousSp = 0;
+
// For each native frame
while (true)
{
@@ -117,9 +119,10 @@ ThreadInfo::UnwindNativeFrames(CrashInfo& crashInfo, CONTEXT* pContext)
GetFrameLocation(pContext, &ip, &sp);
TRACE("Unwind: sp %" PRIA PRIx64 " ip %" PRIA PRIx64 "\n", sp, ip);
- if (ip == 0) {
+ if (ip == 0 || sp <= previousSp) {
break;
}
+
// Add two pages around the instruction pointer to the core dump
crashInfo.InsertMemoryRegion(ip - PAGE_SIZE, PAGE_SIZE * 2);
@@ -136,6 +139,7 @@ ThreadInfo::UnwindNativeFrames(CrashInfo& crashInfo, CONTEXT* pContext)
TRACE("Unwind: PAL_VirtualUnwindOutOfProc returned false\n");
break;
}
+ previousSp = sp;
}
}