Here are the result of a gnulib testdir with CFLAGS="-O -ggdb -fsanitize=thread".
1) test-*printf-posix[23].sh, test-get-rusage-as fail because the ThreadSanitizer does not have enough memory for its own operation. 2) test-getgroups blows up (quickly uses more than 6 GB of memory) and then gets killed by the Linux kernel. dmesg says: [274463.520311] Out of memory: Kill process 16149 (test-getgroups) score 612 or sacrifice child [274463.520318] Killed process 16149 (test-getgroups) total-vm:132607169824kB, anon-rss:6662924kB, file-rss:0kB 3) test-idpriv-drop.sh and test-idpriv-droptemp.sh ask for the root password and then hang indefinitely. 4) test-lock triggers an internal error in the ThreadSanitizer's deadlock detector. 5) test-pthread_sigmask2 leaks a thread. Conclusion: I would say I won't try this sanitizer option any more in a while. Bruno FAIL: test-dprintf-posix2.sh ============================ ==17721==ERROR: ThreadSanitizer failed to allocate 0x12000 (73728) bytes of SignalContext (errno: 12) ERROR: Failed to mmap FAIL test-dprintf-posix2.sh (exit status: 1) FAIL: test-fprintf-posix2.sh ============================ ==21368==ERROR: ThreadSanitizer failed to allocate 0x12000 (73728) bytes of SignalContext (errno: 12) ERROR: Failed to mmap FAIL test-fprintf-posix2.sh (exit status: 1) FAIL: test-fprintf-posix3.sh ============================ ==21390==ERROR: ThreadSanitizer failed to allocate 0x12000 (73728) bytes of SignalContext (errno: 12) ERROR: Failed to mmap FAIL test-fprintf-posix3.sh (exit status: 1) FAIL: test-get-rusage-as ======================== ==22087==ERROR: ThreadSanitizer failed to allocate 0x12000 (73728) bytes of SignalContext (errno: 12) ERROR: Failed to mmap FAIL test-get-rusage-as (exit status: 1) FAIL: test-getgroups ==================== FAIL test-getgroups (exit status: 137) FAIL: test-idpriv-drop.sh ========================= Terminated FAIL test-idpriv-drop.sh (exit status: 1) FAIL: test-idpriv-droptemp.sh ============================= Terminated FAIL test-idpriv-droptemp.sh (exit status: 1) FAIL: test-lock =============== Starting test_lock ... OK Starting test_rwlock ... OK Starting test_recursive_lock ... OK Starting test_once ...FATAL: ThreadSanitizer CHECK failed: ../../../../src/libsanitizer/sanitizer_common/sanitizer_deadlock_detector.h:67 "((n_all_locks_)) < (((sizeof(all_locks_with_contexts_)/sizeof((all_locks_with_contexts_)[0]))))" (0x40, 0x40) #0 <null> <null> (libtsan.so.0+0x000000075193) #1 <null> <null> (libtsan.so.0+0x00000007519b) #2 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) <null> (libtsan.so.0+0x000000079d13) #3 <null> <null> (libtsan.so.0+0x00000007dafd) #4 <null> <null> (libtsan.so.0+0x000000071b95) #5 pthread_rwlock_wrlock <null> (libtsan.so.0+0x000000028e95) #6 test_once ../../gltests/test-lock.c:646 (test-lock+0x0000004025c8) #7 main ../../gltests/test-lock.c:738 (test-lock+0x0000004025c8) #8 __libc_start_main <null> (libc.so.6+0x00000002082f) #9 _start <null> (test-lock+0x000000401768) FAIL test-lock (exit status: 1) FAIL: test-printf-posix2.sh =========================== ==21938==ERROR: ThreadSanitizer failed to allocate 0x12000 (73728) bytes of SignalContext (errno: 12) ERROR: Failed to mmap FAIL test-printf-posix2.sh (exit status: 1) FAIL: test-pthread_sigmask2 =========================== ================== WARNING: ThreadSanitizer: thread leak (pid=21976) Thread T1 (tid=21978, finished) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x000000027577) #1 main ../../gltests/test-pthread_sigmask2.c:70 (test-pthread_sigmask2+0x0000004015bb) SUMMARY: ThreadSanitizer: thread leak ??:0 __interceptor_pthread_create ================== ThreadSanitizer: reported 1 warnings FAIL test-pthread_sigmask2 (exit status: 66)