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 nptl/5550] New: pthread_cond_destroy() fails to release condition variable lock.


The pthread_cond_destroy() function fails to release the condition variable lock
cond->__data.__lock after checking for waiters.

Doing so may not be necessary since the condition variable is essentially in an
undefined state following the return from pthread_cond_destroy but it's nice to
be thorough.

The following patch will release the lock:

--- nptl/pthread_cond_destroy.orig.c    2008-01-07 14:36:35.000000000 -0600
+++ nptl/pthread_cond_destroy.c 2008-01-07 14:37:52.000000000 -0600
@@ -79,6 +79,8 @@
       while (nwaiters >= (1 << COND_NWAITERS_SHIFT));
     }
 
+  lll_unlock (cond->__data.__lock, pshared);
+
   return 0;
 }
 versioned_symbol (libpthread, __pthread_cond_destroy,

-- 
           Summary: pthread_cond_destroy() fails to release condition
                    variable lock.
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: rsa at us dot ibm dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: powerpc64-linux
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=5550

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