From 66e1a311f5caee9a38a5314addc55b729315ad60 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Wed, 27 Oct 2004 17:11:43 +0000 Subject: [PATCH] Fix brk(3). The stack was unbalanced when we jumped to cerror. Oops! This causes nasty things like SEGV or a cpu spin when we return. Submitted by: "James R. Van Artsalen" --- lib/libc/amd64/sys/brk.S | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/amd64/sys/brk.S b/lib/libc/amd64/sys/brk.S index 7d755e686110..ee04cac89406 100644 --- a/lib/libc/amd64/sys/brk.S +++ b/lib/libc/amd64/sys/brk.S @@ -78,6 +78,7 @@ ok: popq %rdi ret err: + addq $8, %rsp #ifdef PIC movq PIC_GOT(HIDENAME(cerror)),%rdx jmp *%rdx