From 7c68d824e3d29b9e3c441267c6eb36c8d651486c Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 27 May 2018 15:53:02 +0200 Subject: [PATCH] Actually clear the stack after calling functions --- src/arch/i386/kernel.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/i386/kernel.S b/src/arch/i386/kernel.S index 2a47eb9..a845576 100644 --- a/src/arch/i386/kernel.S +++ b/src/arch/i386/kernel.S @@ -65,11 +65,11 @@ _start: /* start the kernel */ push %ebx call main - sub $0x4, %esp + add $0x4, %esp /* exit the kernel */ push %eax call exit - sub $0x4, %esp + add $0x4, %esp hlt