From 79d7667a9f2dae0cfd4ee1e4c2276cc3bcd84a1f Mon Sep 17 00:00:00 2001 From: CHatingPython Date: Tue, 20 Oct 2026 16:23:30 +0200 Subject: [PATCH] fix: align the stack to 16 bytes in isr stubs --- kernel/arch/x86_64/isr.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/arch/x86_64/isr.S b/kernel/arch/x86_64/isr.S index 3c43a8c..e7c1362 100644 --- a/kernel/arch/x86_64/isr.S +++ b/kernel/arch/x86_64/isr.S @@ -24,8 +24,14 @@ common_isr_stub: cld mov %rsp, %rdi + + mov %rsp, %r12 + and $-16, %rsp + call interrupt_handler + mov %r12, %rsp + pop %r15 pop %r14 pop %r13