summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2017-11-20 12:21:11 +0000
committerKamil Rytarowski <n54@gmx.com>2017-11-20 12:21:11 +0000
commit86bff788eba12543de84540df70f34724e677ffa (patch)
treea52d8ca206aa3696b02c6035a2b36147c626b0e8 /clang/lib/Frontend/CompilerInvocation.cpp
parent8b9d1f3c5b6585c656132c5627d8c5bc18cf455f (diff)
downloadbcm5719-llvm-86bff788eba12543de84540df70f34724e677ffa.tar.gz
bcm5719-llvm-86bff788eba12543de84540df70f34724e677ffa.zip
Handle NetBSD specific indirection of libpthread functions
Summary: Correct handling of three libpthread(3) functions on NetBSD: - pthread_mutex_lock(3), - pthread_mutex_unlock(3), - pthread_setcancelstate(3). Code out of the libpthread(3) context uses the libc symbols: - __libc_mutex_lock, - __libc_mutex_unlock, - __libc_thr_setcancelstate. The threading library (libpthread(3)) defines strong aliases: - __strong_alias(__libc_mutex_lock,pthread_mutex_lock) - __strong_alias(__libc_mutex_unlock,pthread_mutex_unlock) - __strong_alias(__libc_thr_setcancelstate,pthread_setcancelstate) This caused that these functions were invisible to sanitizers on NetBSD. Intercept the libc-specific ones and add them as NetBSD-specific aliases for the common pthread(3) ones. NetBSD needs to intercept both functions, as the regularly named ones are used internally in libpthread(3). Sponsored by <The NetBSD Foundation> Reviewers: joerg, dvyukov, vitalybuka Reviewed By: dvyukov Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40241 llvm-svn: 318646
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud