mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 00:34:10 +08:00
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:
committed by
Alan C. Assis
parent
0dc0b94380
commit
f730a86d22
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user