From 384e5bc70da4fcc7d150140a0ae3706b6a33a91a Mon Sep 17 00:00:00 2001 From: Ruihan Li Date: Wed, 15 Oct 2025 23:38:57 +0800 Subject: [PATCH] Fix an off-by-one bug in the trap frame --- ostd/src/arch/x86/trap/trap.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ostd/src/arch/x86/trap/trap.S b/ostd/src/arch/x86/trap/trap.S index 8d1d3ac44..ae9afee1b 100644 --- a/ostd/src/arch/x86/trap/trap.S +++ b/ostd/src/arch/x86/trap/trap.S @@ -10,6 +10,7 @@ * We make the following new changes: * * Add the `trap_handler_table`. * * Adjust some symbol names. + * * Fix an off-by-one bug to correct the RSP value in the trap frame. * * These changes are released under the following license: * @@ -113,7 +114,7 @@ _trap_from_kernel: push r10 push r9 push r8 - lea r8, [rsp + 13*8] + lea r8, [rsp + 14*8] push r8 # push rsp push rbp push rdi