mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-24 12:25:35 +08:00
aarch64: align stack in clone [BZ #27939]
The AArch64 PCS requires 16 byte aligned stack. Previously if the caller passed an unaligned stack to clone then the child crashed. Fixes bug 27939.
This commit is contained in:
parent
a55e2da270
commit
3842ba4949
@ -47,6 +47,8 @@ ENTRY(__clone)
|
||||
/* Sanity check args. */
|
||||
mov x0, #-EINVAL
|
||||
cbz x10, .Lsyscall_error
|
||||
/* Align sp. */
|
||||
and x1, x1, -16
|
||||
cbz x1, .Lsyscall_error
|
||||
|
||||
/* Do the system call. */
|
||||
|
Loading…
Reference in New Issue
Block a user