llvm-project/compiler-rt
Dimitry Andric 28fb22c90f [TSan] Handle FreeBSD specific indirection of libpthread functions
Similar to 60cc1d3218 for NetBSD, add aliases and interceptors for the
following pthread related functions:

- pthread_cond_init(3)
- pthread_cond_destroy(3)
- pthread_cond_signal(3)
- pthread_cond_broadcast(3)
- pthread_cond_wait(3)
- pthread_mutex_init(3)
- pthread_mutex_destroy(3)
- pthread_mutex_lock(3)
- pthread_mutex_trylock(3)
- pthread_mutex_unlock(3)
- pthread_rwlock_init(3)
- pthread_rwlock_destroy(3)
- pthread_rwlock_rdlock(3)
- pthread_rwlock_tryrdlock(3)
- pthread_rwlock_wrlock(3)
- pthread_rwlock_trywrlock(3)
- pthread_rwlock_unlock(3)
- pthread_once(3)
- pthread_sigmask(3)

In FreeBSD's libc, a number of internal aliases of the pthread functions
are invoked, typically with an additional prefixed underscore, e.g.
_pthread_cond_init() and so on.

ThreadSanitizer needs to intercept these aliases too, otherwise some
false positive reports about data races might be produced.

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D119034
2022-02-07 11:01:37 +01:00
..
cmake Revert "[compiler-rt][Darwin] Add arm64 to simulator platforms" 2022-02-03 09:42:49 +00:00
docs Prepare Compiler-RT for GnuInstallDirs, matching libcxx, document all 2021-07-13 15:21:41 +00:00
include [sanitizer_common][test] Enable tests on SPARC 2022-02-01 22:33:56 +01:00
lib [TSan] Handle FreeBSD specific indirection of libpthread functions 2022-02-07 11:01:37 +01:00
test [msan] Guard FP_XSTATE_MAGIC1 usage with SANITIZER_GLIBC 2022-02-04 10:15:11 -08:00
tools [GWP-ASan] Add inbuilt options parser. 2021-01-15 12:57:05 -08:00
unittests [test] Fix asan dynamic unit tests with per-target runtime dirs 2021-10-14 16:47:25 -04:00
utils [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
www [compiler-rt] Document that builtins is known to work on OpenBSD. 2021-09-07 04:25:12 -04:00
.clang-tidy NFC: .clang-tidy: Inherit configs from parents to improve maintainability 2021-06-08 08:25:59 -07:00
.gitignore
CMakeLists.txt [CMake] Use generator expression to get in-tree libc++ path 2022-01-26 14:12:48 -08:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================