summaryrefslogtreecommitdiff
path: root/src/vm/amd64
diff options
context:
space:
mode:
authorSasha Semennikov <alsemenn@microsoft.com>2016-08-08 12:08:00 -0700
committerGitHub <noreply@github.com>2016-08-08 12:08:00 -0700
commit1a5e41cabd47cde8bbb457fdad6c64f05a130167 (patch)
tree42e0ceefa611982f80ec5d6445946adce20c498a /src/vm/amd64
parentdeb00ad58acf627763b6c0a7833fa789e3bb1cd0 (diff)
parent0414d77f4796baf246bce548d8e4bfd9b9daa482 (diff)
downloadcoreclr-1a5e41cabd47cde8bbb457fdad6c64f05a130167.tar.gz
coreclr-1a5e41cabd47cde8bbb457fdad6c64f05a130167.tar.bz2
coreclr-1a5e41cabd47cde8bbb457fdad6c64f05a130167.zip
Merge pull request #6582 from alsemenn/fixrefreg
For helper method frame DAC doesn't read register pointers. So set them to NULL to not use "wrong" data.
Diffstat (limited to 'src/vm/amd64')
-rw-r--r--src/vm/amd64/cgenamd64.cpp6
-rw-r--r--src/vm/amd64/gmsamd64.cpp5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/vm/amd64/cgenamd64.cpp b/src/vm/amd64/cgenamd64.cpp
index 1f7d20a4fb..51aac1ebc6 100644
--- a/src/vm/amd64/cgenamd64.cpp
+++ b/src/vm/amd64/cgenamd64.cpp
@@ -193,6 +193,12 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD)
ENUM_CALLEE_SAVED_REGISTERS();
#undef CALLEE_SAVED_REGISTER
+#define CALLEE_SAVED_REGISTER(regname) pRD->pCurrentContextPointers->regname = pUnwoundState->m_Ptrs.p##regname;
+ ENUM_CALLEE_SAVED_REGISTERS();
+#undef CALLEE_SAVED_REGISTER
+
+ ClearRegDisplayArgumentAndScratchRegisters(pRD);
+
return;
}
#endif // DACCESS_COMPILE
diff --git a/src/vm/amd64/gmsamd64.cpp b/src/vm/amd64/gmsamd64.cpp
index 29d78729bc..d595db0c91 100644
--- a/src/vm/amd64/gmsamd64.cpp
+++ b/src/vm/amd64/gmsamd64.cpp
@@ -129,6 +129,11 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState,
ENUM_CALLEE_SAVED_REGISTERS();
#undef CALLEE_SAVED_REGISTER
+ // Since we don't have context pointers in this case, just assing them to NULL.
+#define CALLEE_SAVED_REGISTER(regname) unwoundState->m_Ptrs.p##regname = NULL;
+ ENUM_CALLEE_SAVED_REGISTERS();
+#undef CALLEE_SAVED_REGISTER
+
#else // !DACCESS_COMPILE
#define CALLEE_SAVED_REGISTER(regname) unwoundState->m_Ptrs.p##regname = PTR_ULONG64(nonVolRegPtrs.regname);