Mercurial > gnulib
comparison lib/get-rusage-as.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 | f63c4e7dfb31 |
children |
comparison
equal
deleted
inserted
replaced
40219:53cae2062bf4 | 40220:2796695e9216 |
---|---|
371 | 371 |
372 | 372 |
373 uintptr_t | 373 uintptr_t |
374 get_rusage_as (void) | 374 get_rusage_as (void) |
375 { | 375 { |
376 #if (defined __APPLE__ && defined __MACH__) || defined _AIX || defined __CYGWIN__ || defined __MVS__ /* Mac OS X, AIX, Cygwin, z/OS */ | 376 #if (defined __APPLE__ && defined __MACH__) || defined _AIX || defined __CYGWIN__ || defined __MVS__ || defined __SANITIZE_THREAD__ /* Mac OS X, AIX, Cygwin, z/OS, gcc -fsanitize=thread */ |
377 /* get_rusage_as_via_setrlimit() does not work. | 377 /* get_rusage_as_via_setrlimit() does not work. |
378 Prefer get_rusage_as_via_iterator(). */ | 378 Prefer get_rusage_as_via_iterator(). */ |
379 return get_rusage_as_via_iterator (); | 379 return get_rusage_as_via_iterator (); |
380 #elif HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __HAIKU__ | 380 #elif HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __HAIKU__ |
381 /* Prefer get_rusage_as_via_setrlimit() if it succeeds, | 381 /* Prefer get_rusage_as_via_setrlimit() if it succeeds, |