Fangrui Song
fb32a69855
[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
2023-01-04 12:04:19 -08:00
..
2022-12-13 16:38:12 -08:00
2022-12-27 19:18:07 +00:00
2022-01-07 15:11:00 +01:00
2022-12-11 20:19:46 +01:00
2023-01-03 13:17:39 -08:00
2022-12-13 16:38:12 -08:00
2022-12-13 16:38:12 -08:00
2022-12-15 00:20:29 +00:00
2022-12-13 16:38:12 -08:00
2022-12-14 00:15:40 +00:00
2022-11-28 06:29:24 -08:00
2022-12-30 19:43:19 -08:00
2022-12-22 17:37:32 -08:00
2022-10-28 05:12:46 +00:00
2022-06-08 17:22:33 -04:00
2023-01-04 12:04:19 -08:00
2022-12-22 19:45:14 -08:00
2021-11-10 19:16:20 -08:00
2023-01-04 12:04:19 -08:00
2022-11-17 13:46:59 -08:00
2022-09-05 14:18:25 +04:00
2022-12-28 18:08:30 -08:00
2022-12-02 11:29:41 -08:00