From: Szabolcs Nagy Date: Fri, 25 Jun 2021 18:58:59 +0000 (+0100) Subject: arm: align stack in clone [BZ 28020] X-Git-Tag: glibc-2.34~179 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=3101b967874fb7d54a23f75fe93c310143e64af6;p=glibc.git arm: align stack in clone [BZ 28020] The arm PCS requires 8 byte aligned stack at function entry. Previously unaligned stack could crash the clone child. Fixes bug 28020. --- diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 44eefee3fc..05596cb7a5 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -31,6 +31,8 @@ ENTRY(__clone) @ sanity check args cmp r0, #0 + @ align sp + and r1, r1, #-8 ite ne cmpne r1, #0 moveq r0, #-EINVAL