]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Align stack to 16 bytes when calling __gettimeofday
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 12 Jul 2015 21:40:25 +0000 (14:40 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 5 Aug 2015 15:36:18 +0000 (08:36 -0700)
Subtract stack by 24 bytes instead of 16 bytes so that stack is aligned
to 16 bytes when calling __gettimeofday.

[BZ #18661]
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
(__lll_timedwait_tid): Align stack to 16 bytes when calling
__gettimeofday.

ChangeLog
sysdeps/unix/sysv/linux/x86_64/lowlevellock.S

index 8a47768e034b69e8cc10869b136559c16d6ab4a9..763771e848c294c463bb952a9169a8bd4a00a9aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-08-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #18661]
+       * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+       (__lll_timedwait_tid): Align stack to 16 bytes when calling
+       __gettimeofday.
+
 2015-08-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        [BZ #18661]
index 0935db5ba4910923525bb62435454c57750c3964..8e1a39dafb52e81c5f3a9870f78727bfcefc4109 100644 (file)
@@ -394,8 +394,9 @@ __lll_timedwait_tid:
        movq    %rdi, %r12
        movq    %rsi, %r13
 
-       subq    $16, %rsp
-       cfi_adjust_cfa_offset(16)
+       /* Align stack to 16 bytes when calling __gettimeofday.  */
+       subq    $24, %rsp
+       cfi_adjust_cfa_offset(24)
 
        /* Get current time.  */
 2:     movq    %rsp, %rdi
@@ -441,8 +442,8 @@ __lll_timedwait_tid:
        jne     1f
 4:     xorl    %eax, %eax
 
-8:     addq    $16, %rsp
-       cfi_adjust_cfa_offset(-16)
+8:     addq    $24, %rsp
+       cfi_adjust_cfa_offset(-24)
        popq    %r13
        cfi_adjust_cfa_offset(-8)
        cfi_restore(%r13)