diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-10-01 23:20:42 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-10-01 23:21:39 +0530 |
commit | 55a051c985c3e7965a2f5dd5f762ac2737adae01 (patch) | |
tree | 39837cae2143d738f84c38380a924b5ef65f14d5 /nptl/sysdeps | |
parent | bec749fda1cbc1934f7e58dd2763603f4f207f26 (diff) | |
download | glibc-55a051c985c3e7965a2f5dd5f762ac2737adae01.tar.gz glibc-55a051c985c3e7965a2f5dd5f762ac2737adae01.tar.xz glibc-55a051c985c3e7965a2f5dd5f762ac2737adae01.zip |
Fix exception table for i386 pthread_cond_wait
[BZ #14477] Add an additional entry in the exception table to jump to __condvar_w_cleanup2 instead of __condvar_w_cleanup for PI mutexes when %ebx contains the address of the futex instead of the condition variable.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S | 12 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S | 12 |
2 files changed, 22 insertions, 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 5f1fd5ddc6..d14d7deb28 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 @@ -200,9 +200,11 @@ __pthread_cond_timedwait: 42: leal (%ebp), %esi movl 28(%esp), %edx addl $cond_futex, %ebx +.Ladd_cond_futex_pi: movl $SYS_futex, %eax ENTER_KERNEL subl $cond_futex, %ebx +.Lsub_cond_futex_pi: movl %eax, %esi /* Set the pi-requeued flag only if the kernel has returned 0. The kernel does not hold the mutex on ETIMEDOUT or any other error. */ @@ -638,7 +640,15 @@ __condvar_tw_cleanup: .uleb128 .Lcstend-.Lcstbegin .Lcstbegin: .long .LcleanupSTART-.LSTARTCODE - .long .Ladd_cond_futex-.LcleanupSTART + .long .Ladd_cond_futex_pi-.LcleanupSTART + .long __condvar_tw_cleanup-.LSTARTCODE + .uleb128 0 + .long .Ladd_cond_futex_pi-.LSTARTCODE + .long .Lsub_cond_futex_pi-.Ladd_cond_futex_pi + .long __condvar_tw_cleanup2-.LSTARTCODE + .uleb128 0 + .long .Lsub_cond_futex_pi-.LSTARTCODE + .long .Ladd_cond_futex-.Lsub_cond_futex_pi .long __condvar_tw_cleanup-.LSTARTCODE .uleb128 0 .long .Ladd_cond_futex-.LSTARTCODE diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S index 2ae7af2613..366de6938a 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S @@ -141,9 +141,11 @@ __pthread_cond_wait: movl %ebp, %edx xorl %esi, %esi addl $cond_futex, %ebx +.Ladd_cond_futex_pi: movl $SYS_futex, %eax ENTER_KERNEL subl $cond_futex, %ebx +.Lsub_cond_futex_pi: /* Set the pi-requeued flag only if the kernel has returned 0. The kernel does not hold the mutex on error. */ cmpl $0, %eax @@ -630,7 +632,15 @@ __condvar_w_cleanup: .uleb128 .Lcstend-.Lcstbegin .Lcstbegin: .long .LcleanupSTART-.LSTARTCODE - .long .Ladd_cond_futex-.LcleanupSTART + .long .Ladd_cond_futex_pi-.LcleanupSTART + .long __condvar_w_cleanup-.LSTARTCODE + .uleb128 0 + .long .Ladd_cond_futex_pi-.LSTARTCODE + .long .Lsub_cond_futex_pi-.Ladd_cond_futex_pi + .long __condvar_w_cleanup2-.LSTARTCODE + .uleb128 0 + .long .Lsub_cond_futex_pi-.LSTARTCODE + .long .Ladd_cond_futex-.Lsub_cond_futex_pi .long __condvar_w_cleanup-.LSTARTCODE .uleb128 0 .long .Ladd_cond_futex-.LSTARTCODE |