aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-01-04 12:04:19 -0800
committerFangrui Song <i@maskray.me>2023-01-04 12:04:19 -0800
commitfb32a69855341630a7084364c66083264e1d18bf (patch)
treea9b3c0ea08e682fee232f0b9183dec93b977b88b /clang/lib/Frontend/InitPreprocessor.cpp
parentce43e2f07477a166712b7ee4a89fbc65d2ed56ad (diff)
downloadllvm-fb32a69855341630a7084364c66083264e1d18bf.zip
llvm-fb32a69855341630a7084364c66083264e1d18bf.tar.gz
llvm-fb32a69855341630a7084364c66083264e1d18bf.tar.bz2
[sanitizer] Move {,__}pthread_mutex_{lock,unlock} interceptors to tsan
These interceptors are pure forwarders for other sanitizers. Move them beside tsan-specific pthread_mutex_{trylock,timedlock} interceptors. While here, guard `__pthread_mutex_{lock,unlock}` (D46793) under `#if !__GLIBC_PREREQ(2, 34)`. In glibc>=2.34 [1], `__pthread_mutex_{lock,unlock}` only have non-default-version definitions (unversioned `__pthread_mutex_lock` causes a linker error. Program preloading is not expected). In glibc>=2.36 [2], `dlsym(RTLD_NEXT, "__pthread_mutex_lock")` returns nullptr, so the interceptor won't work. Fix https://github.com/llvm/llvm-project/issues/59820 [1]: https://sourceware.org/git/?p=glibc.git;a=commit;h=99f841c441feeaa9a3d97fd91bb3d6ec8073c982 [2]: https://sourceware.org/git/?p=glibc.git;a=commit;h=efa7936e4c91b1c260d03614bb26858fbb8a0204 Reviewed By: melver, vitalybuka Differential Revision: https://reviews.llvm.org/D140957
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions