diff options
author | Roland McGrath <roland@gnu.org> | 2003-03-23 10:12:59 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2003-03-23 10:12:59 +0000 |
commit | 85047fe3b9a57c0de50692791b4c6f6301a49d1d (patch) | |
tree | d17c4c821c3c2b4fdadcd36da3edf07d8a3f6aff /nptl | |
parent | b910f7887bdc3c07e460c8ee25ba552c6a2249a5 (diff) | |
download | glibc-85047fe3b9a57c0de50692791b4c6f6301a49d1d.zip glibc-85047fe3b9a57c0de50692791b4c6f6301a49d1d.tar.gz glibc-85047fe3b9a57c0de50692791b4c6f6301a49d1d.tar.bz2 |
* tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
undefined behavior.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 3 | ||||
-rw-r--r-- | nptl/tst-mutex5.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index fa76272..cf973dd 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -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. diff --git a/nptl/tst-mutex5.c b/nptl/tst-mutex5.c index 7c414bc..a615012 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"); |