Message ID | 20241105034039.31143-2-imp@bsdimp.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [PULL,1/3] bsd-user/x86_64/target_arch_thread.h: Align stack | expand |
diff --git a/bsd-user/x86_64/target_arch_thread.h b/bsd-user/x86_64/target_arch_thread.h index 52c28906d6d..7739bb2154b 100644 --- a/bsd-user/x86_64/target_arch_thread.h +++ b/bsd-user/x86_64/target_arch_thread.h @@ -31,7 +31,7 @@ static inline void target_thread_init(struct target_pt_regs *regs, struct image_info *infop) { regs->rax = 0; - regs->rsp = infop->start_stack; + regs->rsp = ((infop->start_stack - 8) & ~0xfUL) + 8; regs->rip = infop->entry; regs->rdi = infop->start_stack; }