summaryrefslogtreecommitdiff
path: root/src/vm/eetwain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/eetwain.cpp')
-rw-r--r--src/vm/eetwain.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vm/eetwain.cpp b/src/vm/eetwain.cpp
index 18bc24ae39..a0d302cdb2 100644
--- a/src/vm/eetwain.cpp
+++ b/src/vm/eetwain.cpp
@@ -3815,7 +3815,10 @@ bool UnwindEbpDoubleAlignFrame(
// TODO Currently we assume that ESP of funclet frames is always fixed but actually it could change.
if (pCodeInfo->IsFunclet())
{
- baseSP = curESP + 12; // padding for 16byte stack alignment allocated in genFuncletProlog()
+ // Set baseSP as initial SP
+ baseSP = pContext->pCurrentContext->ResumeEsp;
+ // 16-byte stack alignment padding (allocated in genFuncletProlog)
+ baseSP += 12;
pContext->PCTAddr = baseSP;
pContext->ControlPC = *PTR_PCODE(pContext->PCTAddr);