This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix CFI annotations in pthread_cond_timedwait for i486+
- From: Andreas Schwab <schwab at suse dot de>
- To: libc-alpha at sourceware dot org
- Date: Tue, 26 Nov 2013 13:34:44 +0100
- Subject: [PATCH] Fix CFI annotations in pthread_cond_timedwait for i486+
- Authentication-results: sourceware.org; auth=none
This fixes a crash when pthread_cond_timedwait is canceled. The frame
state at the __condvar_tw_cleanup2 label needs to be the same as at the
.LcleanupSTART label.
Tested on i586-suse-linux with both --enable-kernel=2.6.26 and
--enable-kernel=2.6.32.
Andreas.
[BZ #15843]
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
(__pthread_cond_timedwait): Remove wrong cfi_adjust_cfa_offset
before __condvar_tw_cleanup2 label.
---
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
index a6d6bc4..b74e4b5 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
@@ -505,9 +505,9 @@ __pthread_cond_timedwait:
#endif
call __lll_unlock_wake
jmp 11b
- cfi_adjust_cfa_offset(-FRAME_SIZE)
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+ cfi_adjust_cfa_offset(-FRAME_SIZE)
.Lreltmo:
/* Get internal lock. */
movl $1, %edx
@@ -742,7 +742,6 @@ __pthread_cond_timedwait:
# endif
call __lll_lock_wait
jmp 106b
- cfi_adjust_cfa_offset(-FRAME_SIZE)
#endif
.size __pthread_cond_timedwait, .-__pthread_cond_timedwait
--
1.8.4.4
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."