mirror of
https://github.com/apache/nuttx.git
synced 2026-08-02 04:38:59 +00: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:
parent
0dc0b94380
commit
f730a86d22
1 changed files with 4 additions and 0 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue