Fix Linux/x86 FuncEvalHijack stack alignment (dotnet/coreclr#17143)
authorIgor Kulaychuk <igor.kulaychuk@gmail.com>
Fri, 23 Mar 2018 11:12:54 +0000 (14:12 +0300)
committerJan Vorlicek <janvorli@microsoft.com>
Fri, 23 Mar 2018 11:12:54 +0000 (12:12 +0100)
Commit migrated from https://github.com/dotnet/coreclr/commit/322574213202b408f82d6f50a5391576629e5392

src/coreclr/src/debug/ee/i386/dbghelpers.S

index d0a1101..f15ca5a 100644 (file)
@@ -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
 
 //