]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
authorRoland McGrath <roland@gnu.org>
Sun, 23 Mar 2003 10:12:59 +0000 (10:12 +0000)
committerRoland McGrath <roland@gnu.org>
Sun, 23 Mar 2003 10:12:59 +0000 (10:12 +0000)
undefined behavior.

nptl/ChangeLog
nptl/tst-mutex5.c

index fa7627279557656b3f00be9f5950b79de4c988ec..cf973dde42519861d05c6030fbfc12b8afe7771d 100644 (file)
@@ -1,5 +1,8 @@
 2003-03-23  Roland McGrath  <roland@redhat.com>
 
+       * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
+       undefined behavior.
+
        * tst-join5.c (tf1, tf2): Add a cast.
 
        * Makeconfig (includes): Append -I$(..)nptl to this variable.
index 7c414bc33968374d272a39cdb9acc7c3a64eb62a..a6150125073e9cdeabb69bf45483db2a78371f7b 100644 (file)
@@ -142,6 +142,12 @@ do_test (void)
       return 1;
     }
 
+  if (pthread_mutex_unlock (&m) != 0)
+    {
+      puts ("final mutex_unlock failed");
+      return 1;
+    }
+
   if (pthread_mutex_destroy (&m) != 0)
     {
       puts ("mutex_destroy failed");