]> granicus.if.org Git - gc/commit
Fix thread id leaks in subthread_create and threadkey_test
authorIvan Maidanski <ivmai@mail.ru>
Tue, 19 Sep 2017 22:23:43 +0000 (01:23 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 28 Sep 2017 08:50:02 +0000 (11:50 +0300)
commit7574e33a0b93754c875fd7d6021111cb0187c157
treeff70a2fa7142e88aef01b933a57b5b50a73db26c
parentd7f7b3ea3a006943907c1999781d82f83bdcabda
Fix thread id leaks in subthread_create and threadkey_test

* tests/subthread_create.c [GC_PTHREADS] (entry): Call pthread_detach
for the created thread.
* tests/threadkey_test.c (main): Likewise.
* tests/test.c [GC_PTHREADS && CPPCHECK] (main): Remove
UNTESTED(GC_pthread_detach).
* tests/threadkey_test.c (on_thread_exit_inner): New local variable
attr; call pthread_attr_init and pthread_attr_setdetachstate;
pass attr to GC_pthread_create; call pthread_attr_destroy.
tests/subthread_create.c
tests/test.c
tests/threadkey_test.c