From 7d51961b6f25accb65d7a11dab8be7e47201f308 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 15 Dec 2011 15:12:43 -0800 Subject: [PATCH] rt: Fix saved address of unwinding %rsp in __morestack I haven't thought too deeply about this, but I think I was telling the unwinder to use the stack pointer for the wrong frame when unwinding. Not sure how that could have worked at all, but this results in the correct alignment for cleanups. --- src/rt/arch/x86_64/morestack.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rt/arch/x86_64/morestack.S b/src/rt/arch/x86_64/morestack.S index 3cb5e2d8a9d..369e4a340e0 100644 --- a/src/rt/arch/x86_64/morestack.S +++ b/src/rt/arch/x86_64/morestack.S @@ -68,7 +68,7 @@ MORESTACK: .cfi_offset %rsp, -24 // Save the grandparent stack pointer for the unwinder - leaq 16(%rbp), %rax + leaq 24(%rbp), %rax pushq %rax // FIXME: libgcc also saves rax. not sure if we need to -- GitLab