mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
(__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
This commit is contained in:
@@ -82,6 +82,7 @@ __pthread_cond_timedwait:
|
|||||||
|
|
||||||
addl $1, total_seq(%ebx)
|
addl $1, total_seq(%ebx)
|
||||||
adcl $0, total_seq+4(%ebx)
|
adcl $0, total_seq+4(%ebx)
|
||||||
|
addl $1, cond_futex(%ebx)
|
||||||
|
|
||||||
#define FRAME_SIZE 24
|
#define FRAME_SIZE 24
|
||||||
subl $FRAME_SIZE, %esp
|
subl $FRAME_SIZE, %esp
|
||||||
@@ -148,6 +149,8 @@ __pthread_cond_timedwait:
|
|||||||
21: movl %ecx, 4(%esp)
|
21: movl %ecx, 4(%esp)
|
||||||
movl %edx, 8(%esp)
|
movl %edx, 8(%esp)
|
||||||
|
|
||||||
|
movl cond_futex(%ebx), %edi
|
||||||
|
|
||||||
/* Unlock. */
|
/* Unlock. */
|
||||||
LOCK
|
LOCK
|
||||||
#if cond_lock == 0
|
#if cond_lock == 0
|
||||||
@@ -164,12 +167,12 @@ __pthread_cond_timedwait:
|
|||||||
leal 4(%esp), %esi
|
leal 4(%esp), %esi
|
||||||
xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */
|
xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */
|
||||||
movl %edi, %edx
|
movl %edi, %edx
|
||||||
addl $wakeup_seq, %ebx
|
addl $cond_futex, %ebx
|
||||||
.Ladd_wakeup:
|
.Ladd_cond_futex:
|
||||||
movl $SYS_futex, %eax
|
movl $SYS_futex, %eax
|
||||||
ENTER_KERNEL
|
ENTER_KERNEL
|
||||||
subl $wakeup_seq, %ebx
|
subl $cond_futex, %ebx
|
||||||
.Lsub_wakeup:
|
.Lsub_cond_futex:
|
||||||
movl %eax, %esi
|
movl %eax, %esi
|
||||||
|
|
||||||
movl (%esp), %eax
|
movl (%esp), %eax
|
||||||
@@ -212,6 +215,7 @@ __pthread_cond_timedwait:
|
|||||||
|
|
||||||
addl $1, wakeup_seq(%ebx)
|
addl $1, wakeup_seq(%ebx)
|
||||||
adcl $0, wakeup_seq+4(%ebx)
|
adcl $0, wakeup_seq+4(%ebx)
|
||||||
|
addl $1, cond_futex(%ebx)
|
||||||
movl $ETIMEDOUT, %esi
|
movl $ETIMEDOUT, %esi
|
||||||
jmp 14f
|
jmp 14f
|
||||||
|
|
||||||
@@ -359,7 +363,7 @@ __condvar_tw_cleanup3:
|
|||||||
.size __condvar_tw_cleanup3, .-__condvar_tw_cleanup3
|
.size __condvar_tw_cleanup3, .-__condvar_tw_cleanup3
|
||||||
.type __condvar_tw_cleanup2, @function
|
.type __condvar_tw_cleanup2, @function
|
||||||
__condvar_tw_cleanup2:
|
__condvar_tw_cleanup2:
|
||||||
subl $wakeup_seq, %ebx
|
subl $cond_futex, %ebx
|
||||||
.size __condvar_tw_cleanup2, .-__condvar_tw_cleanup2
|
.size __condvar_tw_cleanup2, .-__condvar_tw_cleanup2
|
||||||
.type __condvar_tw_cleanup, @function
|
.type __condvar_tw_cleanup, @function
|
||||||
__condvar_tw_cleanup:
|
__condvar_tw_cleanup:
|
||||||
@@ -384,12 +388,14 @@ __condvar_tw_cleanup:
|
|||||||
call __lll_mutex_lock_wait
|
call __lll_mutex_lock_wait
|
||||||
|
|
||||||
1: movl broadcast_seq(%ebx), %eax
|
1: movl broadcast_seq(%ebx), %eax
|
||||||
cmpl 12(%esp), %eax
|
cmpl 20(%esp), %eax
|
||||||
jne 3f
|
jne 3f
|
||||||
|
|
||||||
addl $1, wakeup_seq(%ebx)
|
addl $1, wakeup_seq(%ebx)
|
||||||
adcl $0, wakeup_seq+4(%ebx)
|
adcl $0, wakeup_seq+4(%ebx)
|
||||||
|
|
||||||
|
addl $1, cond_futex(%ebx)
|
||||||
|
|
||||||
addl $1, woken_seq(%ebx)
|
addl $1, woken_seq(%ebx)
|
||||||
adcl $0, woken_seq+4(%ebx)
|
adcl $0, woken_seq+4(%ebx)
|
||||||
|
|
||||||
@@ -409,7 +415,7 @@ __condvar_tw_cleanup:
|
|||||||
call __lll_mutex_unlock_wake
|
call __lll_mutex_unlock_wake
|
||||||
|
|
||||||
/* Wake up all waiters to make sure no signal gets lost. */
|
/* Wake up all waiters to make sure no signal gets lost. */
|
||||||
2: addl $wakeup_seq, %ebx
|
2: addl $cond_futex, %ebx
|
||||||
movl $FUTEX_WAKE, %ecx
|
movl $FUTEX_WAKE, %ecx
|
||||||
movl $SYS_futex, %eax
|
movl $SYS_futex, %eax
|
||||||
movl $0x7fffffff, %edx
|
movl $0x7fffffff, %edx
|
||||||
@@ -435,7 +441,7 @@ __condvar_tw_cleanup:
|
|||||||
.uleb128 .Lcstend-.Lcstbegin
|
.uleb128 .Lcstend-.Lcstbegin
|
||||||
.Lcstbegin:
|
.Lcstbegin:
|
||||||
.long .LcleanupSTART-.LSTARTCODE
|
.long .LcleanupSTART-.LSTARTCODE
|
||||||
.long .Ladd_wakeup-.LcleanupSTART
|
.long .Ladd_cond_futex-.LcleanupSTART
|
||||||
.long __condvar_tw_cleanup-.LSTARTCODE
|
.long __condvar_tw_cleanup-.LSTARTCODE
|
||||||
.uleb128 0
|
.uleb128 0
|
||||||
.long .LebxmovedUR-.LSTARTCODE
|
.long .LebxmovedUR-.LSTARTCODE
|
||||||
@@ -443,15 +449,15 @@ __condvar_tw_cleanup:
|
|||||||
.long __condvar_tw_cleanup3-.LSTARTCODE
|
.long __condvar_tw_cleanup3-.LSTARTCODE
|
||||||
.uleb128 0
|
.uleb128 0
|
||||||
.long .LebxmovedUR-.LSTARTCODE
|
.long .LebxmovedUR-.LSTARTCODE
|
||||||
.long .Ladd_wakeup-.LebxmovedUR
|
.long .Ladd_cond_futex-.LebxmovedUR
|
||||||
.long __condvar_tw_cleanup-.LSTARTCODE
|
.long __condvar_tw_cleanup-.LSTARTCODE
|
||||||
.uleb128 0
|
.uleb128 0
|
||||||
.long .Ladd_wakeup-.LSTARTCODE
|
.long .Ladd_cond_futex-.LSTARTCODE
|
||||||
.long .Lsub_wakeup-.Ladd_wakeup
|
.long .Lsub_cond_futex-.Ladd_cond_futex
|
||||||
.long __condvar_tw_cleanup2-.LSTARTCODE
|
.long __condvar_tw_cleanup2-.LSTARTCODE
|
||||||
.uleb128 0
|
.uleb128 0
|
||||||
.long .Lsub_wakeup-.LSTARTCODE
|
.long .Lsub_cond_futex-.LSTARTCODE
|
||||||
.long .LcleanupEND-.Lsub_wakeup
|
.long .LcleanupEND-.Lsub_cond_futex
|
||||||
.long __condvar_tw_cleanup-.LSTARTCODE
|
.long __condvar_tw_cleanup-.LSTARTCODE
|
||||||
.uleb128 0
|
.uleb128 0
|
||||||
.long .LcallUR-.LSTARTCODE
|
.long .LcallUR-.LSTARTCODE
|
||||||
|
Reference in New Issue
Block a user