diff options
author | Hanjoung Lee <waterets@gmail.com> | 2017-03-07 17:57:29 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-03-07 09:57:29 +0100 |
commit | fd62b32850e9f6be88c6ece155b447b1ff167908 (patch) | |
tree | e28c9b6d57f736ca304fe6938a731e025fdc7d41 /src/vm/eetwain.cpp | |
parent | b948d963376e07cf7381010af727fb330f717c41 (diff) | |
download | coreclr-fd62b32850e9f6be88c6ece155b447b1ff167908.tar.gz coreclr-fd62b32850e9f6be88c6ece155b447b1ff167908.tar.bz2 coreclr-fd62b32850e9f6be88c6ece155b447b1ff167908.zip |
[x86/Linux] Fix incorrect FP values (#9975)
* [x86/Linux] Fix incorrect FP values
Restoring FP by CallerSP could be incorrect for nested EH.
Now that we have #9820, we can use current context for 1st pass of EH.
Fix #9848
Diffstat (limited to 'src/vm/eetwain.cpp')
-rw-r--r-- | src/vm/eetwain.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/vm/eetwain.cpp b/src/vm/eetwain.cpp index 19253c0205..18bc24ae39 100644 --- a/src/vm/eetwain.cpp +++ b/src/vm/eetwain.cpp @@ -5190,11 +5190,7 @@ OBJECTREF EECodeManager::GetInstance( PREGDISPLAY pContext, if (info.ebpFrame) { _ASSERTE(stackDepth == 0); -#if defined(WIN64EXCEPTIONS) - taArgBase = GetCallerSp(pContext) - 2 * sizeof(TADDR); -#else - taArgBase = *pContext->pEbp; -#endif + taArgBase = GetRegdisplayFP(pContext); } else { @@ -5365,11 +5361,7 @@ PTR_VOID EECodeManager::GetParamTypeArg(PREGDISPLAY pContext, return NULL; } -#if defined(WIN64EXCEPTIONS) - TADDR fp = GetCallerSp(pContext) - 2 * sizeof(TADDR); -#else TADDR fp = GetRegdisplayFP(pContext); -#endif TADDR taParamTypeArg = *PTR_TADDR(fp - GetParamTypeArgOffset(&info)); return PTR_VOID(taParamTypeArg); @@ -5497,13 +5489,7 @@ void * EECodeManager::GetGSCookieAddr(PREGDISPLAY pContext, if (info->ebpFrame) { - DWORD curEBP; - -#ifdef WIN64EXCEPTIONS - curEBP = GetCallerSp(pContext) - 2 * 4; -#else - curEBP = *pContext->pEbp; -#endif + DWORD curEBP = GetRegdisplayFP(pContext); return PVOID(SIZE_T(curEBP - info->gsCookieOffset)); } |