This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5458] New: PI Mutex Fix breaks multiple program condition variables
- From: "john dot klug at unisys dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 7 Dec 2007 22:16:35 -0000
- Subject: [Bug libc/5458] New: PI Mutex Fix breaks multiple program condition variables
- Reply-to: sourceware-bugzilla at sourceware dot org
A change was introduced to NPTL on 2006-07-29 04:31:49 by
drepper@sourceware.org. This is in 2.5.
Prior to this change it was possible to use pthread_cond_broadcast() to wake up
a program thread asleep on pthread_cond_wait() using shared memory.
This change is documented in
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S.diff?cvsroot=glibc&r1=1.9&r2=1.10
&
http://sourceware.org/ml/glibc-cvs/2006-q3/msg00061.html
RCS file:
/cvs/glibc/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
The following instruction dereferences the pointer to the mutex that was
provided by the user in pthread_cond_wait(&cond, &mutex). This causes a memory
fault if pthread_cond_broadcast(&cond) is not called from the same program as
pthread_cond_signal(), since the address is used out of context.
/cvs/glibc/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
+ testl $PI_BIT, MUTEX_KIND(%r8)
--
Summary: PI Mutex Fix breaks multiple program condition variables
Product: glibc
Version: unspecified
Status: NEW
Severity: critical
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: john dot klug at unisys dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=5458
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.