public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/27902] New: The x86-64 clone wrapper fails to align child stack
@ 2021-05-23 17:13 hjl.tools at gmail dot com
  2021-05-31 19:07 ` [Bug libc/27902] " hjl.tools at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: hjl.tools at gmail dot com @ 2021-05-23 17:13 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libc/27902] The x86-64 clone wrapper fails to align child stack
  2021-05-23 17:13 [Bug libc/27902] New: The x86-64 clone wrapper fails to align child stack hjl.tools at gmail dot com
@ 2021-05-31 19:07 ` hjl.tools at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: hjl.tools at gmail dot com @ 2021-05-31 19:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27902

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.34
             Status|NEW                         |RESOLVED

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for 2.34 by

commit 92a7d1343991897f77afe01041f3b77712445e47
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun May 23 10:25:10 2021 -0700

    x86-64: Align child stack to 16 bytes [BZ #27902]

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-31 19:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23 17:13 [Bug libc/27902] New: The x86-64 clone wrapper fails to align child stack hjl.tools at gmail dot com
2021-05-31 19:07 ` [Bug libc/27902] " hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).