diff options
author | Dimitry Andric <dimitry@andric.com> | 2022-02-04 21:53:09 +0100 |
---|---|---|
committer | Dimitry Andric <dimitry@andric.com> | 2022-02-07 11:01:37 +0100 |
commit | 28fb22c90fe73877c529ddae74b9fe30a3a09234 (patch) | |
tree | 2029cea52f9207ccd5a787c913a52636add6ace6 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 74555fd367fbff938e4f6487f02197c3f115276b (diff) | |
download | llvm-28fb22c90fe73877c529ddae74b9fe30a3a09234.zip llvm-28fb22c90fe73877c529ddae74b9fe30a3a09234.tar.gz llvm-28fb22c90fe73877c529ddae74b9fe30a3a09234.tar.bz2 |
[TSan] Handle FreeBSD specific indirection of libpthread functions
Similar to 60cc1d3218fc 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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions