[all-commits] [llvm/llvm-project] 5cb753: [tsan] Only intercept pthread_mutex_clocklock on L...

Rainer Orth via All-commits all-commits at lists.llvm.org
Fri Dec 22 06:58:16 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5cb7534a7d17e65bdfa676a4e56698e2a05b89b9
      https://github.com/llvm/llvm-project/commit/5cb7534a7d17e65bdfa676a4e56698e2a05b89b9
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2023-12-22 (Fri, 22 Dec 2023)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

  Log Message:
  -----------
  [tsan] Only intercept pthread_mutex_clocklock on Linux (#76220)

`tsan_interceptors_posix.cpp` doesn't compile on FreeBSD 14.0/amd64:
```
In file included from /vol/llvm/src/llvm-project/local-freebsd/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:25:
/vol/llvm/src/llvm-project/local-freebsd/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp: In function ‘void __tsan::InitializeInterceptors()’:
/vol/llvm/src/llvm-project/local-freebsd/compiler-rt/lib/tsan/rtl/../../interception/interception.h:243:25: error: ‘real_pthread_mutex_clocklock’ is not a member of ‘__interception’; did you mean ‘real_pthread_mutex_unlock’?
```
Fixed by wrapping the `TSAN_INTERCEPT` invocation with `SANITIZER_LINUX`
as is already done for the interceptor definition.

Tested on `amd64-pc-freebsd14.0`.




More information about the All-commits mailing list