This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/4825] buggy unlocking of an unlocked pthread_rwlock_t


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]