This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4825] buggy unlocking of an unlocked pthread_rwlock_t
- From: "tim at klingt dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 23 Jul 2007 09:24:35 -0000
- Subject: [Bug libc/4825] buggy unlocking of an unlocked pthread_rwlock_t
- References: <20070722224043.4825.tim@klingt.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From tim at klingt dot org 2007-07-23 09:24 -------
well, it's not only the result is undefined, but the mutex goes into a broken state:
pthread_rwlock_init(&rwlock, NULL);
pthread_rwlock_unlock(&rwlock);
pthread_rwlock_wrlock(&rwlock); /* deadlock */
pthread_rwlock_unlock(&rwlock);
pthread_rwlock_destroy(&rwlock);
the first unlock has the same semantics as an inversed rdlock ...
i can live with it, but i would appreciate a better documentation of this
behavior ...
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4825
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.