[PATCH] D40767: Support pthread_key_create symbol alias in MSan/NetBSD
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 16:45:08 PST 2017
krytarowski added inline comments.
================
Comment at: lib/msan/msan_interceptors.cc:1488
+#if SANITIZER_NETBSD
+INTERCEPTOR(void, __libc_thr_keycreate, void *m, void (*dtor)(void *value)) \
+ ALIAS(WRAPPER_NAME(pthread_key_create));
----------------
vitalybuka wrote:
> NetBSD header contains following:
> #define pthread_key_create __libc_thr_keycreate
>
>
> Should you instead pthread_key_create interceptor define __libc_thr_keycreate?
pthread_key_create(3) can be called internally in libpthread() or some other way without symbol mangling, this is why I want to intercept both symbol names.
This was the case in TSan in functions like pthread_mutex_lock(3).
Long term NetBSD will likely drop the symbol indirection and remove names like __libc_thr_keycreate.
Repository:
rL LLVM
https://reviews.llvm.org/D40767
More information about the llvm-commits
mailing list