diff tests/test-pthread_sigmask2.c @ 40220:2796695e9216

get-rusage-as, pthread_sigmask tests: Fix -fsanitize=thread findings. * lib/get-rusage-as.c (get_rusage_as): When compiled by "gcc -fsanitize=thread", don't try get_rusage_as_via_setrlimit. * tests/test-pthread_sigmask2.c (main): Clean up the killer_thread before exiting.
author Bruno Haible <bruno@clisp.org>
date Sun, 10 Mar 2019 01:28:42 +0100
parents b06060465f09
children
line wrap: on
line diff
--- a/tests/test-pthread_sigmask2.c	Sat Mar 09 21:38:03 2019 -0800
+++ b/tests/test-pthread_sigmask2.c	Sun Mar 10 01:28:42 2019 +0100
@@ -84,6 +84,10 @@
         before the call to pthread_sigmask() returns."  */
   ASSERT (sigint_occurred == 1);
 
+  /* Clean up the thread.  This avoid a "ThreadSanitizer: thread leak" warning
+     from "gcc -fsanitize=thread".  */
+  gl_thread_join (killer_thread, NULL);
+
   return 0;
 }