[PATCH] alpha: Align stack for alpha

Adhemerval Zanella adhemerval.zanella@linaro.org
Sat Sep 6 22:23:08 GMT 2025


As done already for x86_64 [1] and aarch64 [2].  It fixes
misc/tst-misalign-clone on alpha.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=27902
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=27939
---
 sysdeps/unix/sysv/linux/alpha/clone.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 727346f8b1..f7d464fc9e 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -49,6 +49,8 @@ __clone:
 	/* Sanity check arguments.  */
 	ldiq	v0, EINVAL
 	beq	a0, SYSCALL_ERROR_LABEL	/* no NULL function pointers */
+	/* Align stack.  */
+	bic	a1, 15, a1
 	beq	a1, SYSCALL_ERROR_LABEL	/* no NULL stack pointers */
 
 	/* Save the fn ptr and arg on the new stack.  */
-- 
2.43.0



More information about the Libc-alpha mailing list