This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.21-79-g35264d1


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  35264d14426e1e3ca7b595db1de76208374b56e3 (commit)
      from  6f49e32aa5c7c188b6b8e78a91636eb5ee2e1841 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=35264d14426e1e3ca7b595db1de76208374b56e3

commit 35264d14426e1e3ca7b595db1de76208374b56e3
Author: Torvald Riegel <triegel@redhat.com>
Date:   Sun Feb 15 17:33:31 2015 +0100

    Make error checking effective in nptl/tst-cond25.c.

diff --git a/ChangeLog b/ChangeLog
index a0f0ae2..78fe389 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-16  Torvald Riegel  <triegel@redhat.com>
+
+	* nptl/tst-cond25.c (cleanup): Explicitly check that the mutex is
+	acquired.
+
 2015-02-15  Matthew Fortune <Matthew.Fortune@imgtec.com>
 
 	[BZ #17792]
diff --git a/nptl/tst-cond25.c b/nptl/tst-cond25.c
index d80d8f7..be0bec4 100644
--- a/nptl/tst-cond25.c
+++ b/nptl/tst-cond25.c
@@ -40,7 +40,15 @@ pthread_cond_t cond;
 
 void cleanup (void *u)
 {
-  /* pthread_cond_wait should always return with the mutex locked.  */
+  /* pthread_cond_wait should always return with the mutex locked.  The
+     pthread_mutex_unlock implementation does not actually check whether we
+     own the mutex for several mutex kinds, so check this explicitly.  */
+  int ret = pthread_mutex_trylock (&mutex);
+  if (ret != EDEADLK && ret != EBUSY)
+    {
+      printf ("mutex not locked in cleanup %d\n", ret);
+      abort ();
+    }
   if (pthread_mutex_unlock (&mutex))
     abort ();
 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    5 +++++
 nptl/tst-cond25.c |   10 +++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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