From 322574213202b408f82d6f50a5391576629e5392 Mon Sep 17 00:00:00 2001 From: Igor Kulaychuk Date: Fri, 23 Mar 2018 14:12:54 +0300 Subject: Fix Linux/x86 FuncEvalHijack stack alignment (#17143) --- src/debug/ee/i386/dbghelpers.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/debug/ee/i386/dbghelpers.S b/src/debug/ee/i386/dbghelpers.S index d0a11011ca..f15ca5abd8 100644 --- a/src/debug/ee/i386/dbghelpers.S +++ b/src/debug/ee/i386/dbghelpers.S @@ -9,10 +9,14 @@ // @dbgtodo- once we port Funceval, use the ExceptionHijack stub instead of this func-eval stub. NESTED_ENTRY FuncEvalHijack, _TEXT, UnhandledExceptionHandlerUnix +#define STK_ALIGN_PADDING 12 + sub esp, STK_ALIGN_PADDING push eax // the ptr to the DebuggerEval + CHECK_STACK_ALIGNMENT call C_FUNC(FuncEvalHijackWorker) + add esp, (4 + STK_ALIGN_PADDING) jmp eax // return is the patch addresss to jmp to - +#undef STK_ALIGN_PADDING NESTED_END FuncEvalHijack, _TEXT // -- cgit v1.2.3