This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/12674] sem_post/sem_wait race causing sem_post to return EINVAL
- From: "drepper.fsp at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sun, 17 Apr 2011 03:50:29 +0000
- Subject: [Bug nptl/12674] sem_post/sem_wait race causing sem_post to return EINVAL
- Auto-submitted: auto-generated
- References: <bug-12674-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12674
Ulrich Drepper <drepper.fsp at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-04-17 03:49:43 UTC ---
Why would this at all be a bug? The fact that the sem_wait succeeds doesn't
indicate at all that the semaphore is unused and destroying an unused semaphore
is of course completely illegal. Your code is wrong in assuming what it does.
You have to wait for the sem_post call to also return before destroying the
semaphore.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.