This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/19515] New: wrong assertion in pthread_mutex_unlock() with lock elision
- From: "aurelien at aurel32 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 23 Jan 2016 20:26:20 +0000
- Subject: [Bug nptl/19515] New: wrong assertion in pthread_mutex_unlock() with lock elision
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19515
Bug ID: 19515
Summary: wrong assertion in pthread_mutex_unlock() with lock
elision
Product: glibc
Version: unspecified
URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=8103
22
Status: NEW
Severity: normal
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: aurelien at aurel32 dot net
CC: drepper.fsp at gmail dot com
Target Milestone: ---
The following code from Andreas Messer fails with an assertion when run on a
system with hardware support for lock elision, and with a libc with lock
elision enabled.
#include <pthread.h>
#include <time.h>
int main(int argc, char* argv[])
{
pthread_mutex_t mutex;
pthread_mutexattr_t attr;
struct timespec ts;
pthread_mutexattr_init( &attr );
pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_ERRORCHECK );
pthread_mutex_init( &mutex, &attr );
clock_gettime( CLOCK_REALTIME, &ts );
ts.tv_sec += 3;
pthread_mutex_timedlock( &mutex, &ts );
pthread_mutex_unlock(&mutex);
return 0;
}
It returns the following assertion:
a.out: pthread_mutex_unlock.c:87: __pthread_mutex_unlock_usercnt: Assertion
`type == PTHREAD_MUTEX_ERRORCHECK_NP' failed.
Aborted
Patch will follow on the mailing list.
--
You are receiving this mail because:
You are on the CC list for the bug.