summaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2019-07-11 23:26:14 +0200
committerGitHub <noreply@github.com>2019-07-11 23:26:14 +0200
commit2290c1f10e58feef8636679788eb060705dae9b3 (patch)
tree17590690298f1e37255b7d87e03da6b85cda2b46 /src/inc
parentb4c7a2e6d97759b1d90f184664b510596cc64fd9 (diff)
downloadcoreclr-2290c1f10e58feef8636679788eb060705dae9b3.tar.gz
coreclr-2290c1f10e58feef8636679788eb060705dae9b3.tar.bz2
coreclr-2290c1f10e58feef8636679788eb060705dae9b3.zip
Fix GS cookie check on ARM in functions with stackalloc (#25628)
* Fix GS cookie check on ARM in functions with stackalloc The GC cookie check was failing during GC stack walking on ARM for frames of functions using stackalloc and pinvoke. The InlinedCallFrame stores only the SP after the stackalloc adjustment and unwinder needs R9 that contains SP before the stackalloc to be able to unwind the frame to get caller SP. The caller SP is used as a base for getting the GS cookie address. We were incorrectly setting the R9 in the CONTEXT to the same value as SP and so the unwinding was getting an incorrect caller SP. The fix is to store R9 in the InlinedCallFrame for ARM.
Diffstat (limited to 'src/inc')
-rw-r--r--src/inc/corinfo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/inc/corinfo.h b/src/inc/corinfo.h
index 083450b016..9cc849043e 100644
--- a/src/inc/corinfo.h
+++ b/src/inc/corinfo.h
@@ -1813,6 +1813,8 @@ struct CORINFO_EE_INFO
unsigned offsetOfCalleeSavedFP;
unsigned offsetOfCallTarget;
unsigned offsetOfReturnAddress;
+ // This offset is used only for ARM
+ unsigned offsetOfSPAfterProlog;
}
inlinedCallFrameInfo;