[PATCH] D46793: [sanitizer] Intercept __pthread_mutex_lock and __pthread_mutex_unlock

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 12 22:41:47 PDT 2018


vitalybuka added a comment.

In https://reviews.llvm.org/D46793#1096839, @dvyukov wrote:

> Interesting. Who calls these functions? Why? Can we change them to call normal functions instead?


I've cc'd you on the internal bug.

> In pthread they are no more than aliases to normal functions, can we do it with aliases too? like we do it for __libc_mutex_lock:
> 
> sanitizer_common/sanitizer_common_interceptors.inc-INTERCEPTOR(int, __libc_mutex_lock, void *m) \
>  sanitizer_common/sanitizer_common_interceptors.inc:  ALIAS(WRAPPER_NAME(pthread_mutex_lock));

Alias version works.


Repository:
  rL LLVM

https://reviews.llvm.org/D46793





More information about the llvm-commits mailing list