From fbfcda2926d70ba5cc86244d4e8fea6507e87994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Balogh?= Date: Tue, 9 Sep 2014 17:47:13 +0000 Subject: [PATCH] AROS: apparently, the NewStackSwap() function is just a half arsed copy of MorphOS/NewPPCStackSwap(), so it doesn't accept nil as its third argument. Therefore we pass a pointer to some area we won't use anyway. this fixes crashes in the stack swapping code on hosted systems. git-svn-id: trunk@28636 - --- rtl/aros/i386/prt0.as | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtl/aros/i386/prt0.as b/rtl/aros/i386/prt0.as index 5fdb8de496..527dc5cb7e 100644 --- a/rtl/aros/i386/prt0.as +++ b/rtl/aros/i386/prt0.as @@ -89,7 +89,8 @@ _allocStack: movl %eax,8(%ecx) /* Initial stackpointer */ movl _ExecBase,%eax pushl %eax - pushl $0 + lea StackSwapArgs,%ebx + pushl %ebx lea _initProc,%ebx pushl %ebx pushl %ecx @@ -158,3 +159,4 @@ _ExecBase: .skip 4 StackAreaPtr: .skip 4 StackSwapStruct: .skip 12 +StackSwapArgs: .skip 32