[PATCH] D43879: Cleanup in sanitizer_common_interceptors.inc
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 4 01:51:26 PST 2018
krytarowski added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7270
-#if SANITIZER_NETBSD
- COMMON_INTERCEPT_FUNCTION(__libc_mutex_lock);
- COMMON_INTERCEPT_FUNCTION(__libc_mutex_unlock);
- COMMON_INTERCEPT_FUNCTION(__libc_thr_setcancelstate);
-#endif
+ COMMON_MAYBE_INTERCEPT_NETBSD_ALIAS(mutex_lock);
+ COMMON_MAYBE_INTERCEPT_NETBSD_ALIAS(mutex_unlock);
----------------
vitalybuka wrote:
> krytarowski wrote:
> > vitalybuka wrote:
> > > for consistency it should be
> > > INIT_MUTEX_LOCK
> > > INIT_MUTEX_UNLOCK
> > > INIT_SET_CANCEL_STATE
> > >
> > > All INIT_* macros are already MAYBE and enabled/disabled according to the platform.
> > These ones are aliases specific to NetBSD libc.
> >
> > How about: `INIT_NETBSD_ALIAS*` and `INIT_NETBSD_ALIAS_THR*`?
> I guess the point that here we hide how (_ALIAS_) and on which platform(_NETBSD_) it works
These ones are NetBSD-specific and legacy internal symbols in libc, we allowed to handle non-posix or alternative libpthread implementation, but nowadays it will never happen. We will get rid of them with a new major version bump in libc (no ETA for this).
There is a prior-art in TSan for the same case.
However I will go the requested route.
Repository:
rL LLVM
https://reviews.llvm.org/D43879
More information about the llvm-commits
mailing list