arch/x64: Fix crash issue after enabling KASAN

After up_fork calls the x86_64_fork function, the rsp must be 16-byte aligned; otherwise, the movaps %xmm0, (%rsp) instruction may cause a crash.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
This commit is contained in:
liwenxiang1
2025-07-18 15:06:54 +08:00
committed by Alan C. Assis
parent 0dc0b94380
commit f730a86d22
+4
View File
@@ -118,10 +118,14 @@ up_fork:
pushq %r12
movq %rsp, %rdi
subq $8, %rsp
/* call function */
callq x86_64_fork
addq $8, %rsp
/* Do not modify return value %rax */
/* Restore non-volatile registers */