[Bug libc/27902] New: The x86-64 clone wrapper fails to align child stack
hjl.tools at gmail dot com
sourceware-bugzilla@sourceware.org
Sun May 23 17:13:36 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=27902
Bug ID: 27902
Summary: The x86-64 clone wrapper fails to align child stack
Product: glibc
Version: 2.34
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Target: x86-64
This patch aligns the child stack:
diff --git a/sysdeps/unix/sysv/linux/x86_64/clone.S
b/sysdeps/unix/sysv/linux/x86_64/clone.S
index 31ac12da0c..5f52ce7813 100644
--- a/sysdeps/unix/sysv/linux/x86_64/clone.S
+++ b/sysdeps/unix/sysv/linux/x86_64/clone.S
@@ -57,6 +57,9 @@ ENTRY (__clone)
testq %rsi,%rsi /* no NULL stack pointers */
jz SYSCALL_ERROR_LABEL
+ /* Align stack to 16 bytes per the x86-64 psABI. */
+ andq $-16, %rsi
+
/* Insert the argument onto the new stack. */
subq $16,%rsi
movq %rcx,8(%rsi)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list