From: Roland McGrath Date: Sun, 23 Mar 2003 10:12:59 +0000 (+0000) Subject: * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke X-Git-Tag: cvs/glibc-2_3_3~1096 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85047fe3b9a57c0de50692791b4c6f6301a49d1d;p=thirdparty%2Fglibc.git * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke undefined behavior. --- diff --git a/nptl/ChangeLog b/nptl/ChangeLog index fa762727955..cf973dde425 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,8 @@ 2003-03-23 Roland McGrath + * 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. diff --git a/nptl/tst-mutex5.c b/nptl/tst-mutex5.c index 7c414bc3396..a6150125073 100644 --- a/nptl/tst-mutex5.c +++ b/nptl/tst-mutex5.c @@ -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");