diff options
author | Andreas Schwab <schwab@redhat.com> | 2011-08-09 10:07:10 -0400 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2011-08-09 16:42:12 +0200 |
commit | 3ae1021beaaff6d17198959ce21a301992b1f776 (patch) | |
tree | 397c52a73e74cafb3d870f64c242acde9e5a9609 | |
parent | e2a309033d626c4b643afaf7e7ad2ccf4930dc35 (diff) | |
download | glibc-3ae1021beaaff6d17198959ce21a301992b1f776.tar.gz glibc-3ae1021beaaff6d17198959ce21a301992b1f776.tar.xz glibc-3ae1021beaaff6d17198959ce21a301992b1f776.zip |
Fix stack alignment on x86_64
(cherry picked from commit a724d1b9bfa0f6ee9146b365e43ea6e245d0cf0c)
-rw-r--r-- | nptl/ChangeLog | 7 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S | 6 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S | 6 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S | 4 |
4 files changed, 16 insertions, 7 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index c545b079f4..7411ae5e6f 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,10 @@ +2011-08-08 Andreas Schwab <schwab@redhat.com> + + * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned + stack. + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. + 2011-06-30 Ulrich Drepper <drepper@gmail.com> * nptl-init.c (__nptl_set_robust): New function. diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S index 680696200a..a06cd9b9b9 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 Free Software Foundation, Inc. +/* Copyright (C) 2009, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2009. @@ -71,7 +71,9 @@ ENTRY(__pthread_enable_asynccancel) 1: ret -3: movq $TCB_PTHREAD_CANCELED, %fs:RESULT +3: subq $8, %rsp + cfi_adjust_cfa_offset(8) + movq $TCB_PTHREAD_CANCELED, %fs:RESULT lock orl $TCB_EXITING_BITMASK, %fs:CANCELHANDLING movq %fs:CLEANUP_JMP_BUF, %rdi diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S index e6535fb9a7..48ea8b967e 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 2002-2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -63,9 +63,9 @@ __pthread_cond_timedwait: cfi_adjust_cfa_offset(8) cfi_rel_offset(%r15, 0) #ifdef __ASSUME_FUTEX_CLOCK_REALTIME -# define FRAME_SIZE 32 +# define FRAME_SIZE (32+8) #else -# define FRAME_SIZE 48 +# define FRAME_SIZE (48+8) #endif subq $FRAME_SIZE, %rsp cfi_adjust_cfa_offset(FRAME_SIZE) diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S index f5b929ea71..7535baa786 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2007, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2002-2007, 2009, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -45,7 +45,7 @@ __pthread_cond_wait: cfi_lsda(DW_EH_PE_udata4, .LexceptSTART) #endif -#define FRAME_SIZE 32 +#define FRAME_SIZE (32+8) leaq -FRAME_SIZE(%rsp), %rsp cfi_adjust_cfa_offset(FRAME_SIZE) |