[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 17:15:21 PST 2017


krytarowski updated this revision to Diff 125658.

Repository:
  rL LLVM

https://reviews.llvm.org/D40767

Files:
  lib/msan/msan_interceptors.cc


Index: lib/msan/msan_interceptors.cc
===================================================================
--- lib/msan/msan_interceptors.cc
+++ lib/msan/msan_interceptors.cc
@@ -1085,6 +1085,11 @@
   return res;
 }
 
+#if SANITIZER_NETBSD
+INTERCEPTOR(void, __libc_thr_keycreate, void *m, void (*dtor)(void *value)) \
+  ALIAS(WRAPPER_NAME(pthread_key_create));
+#endif
+
 INTERCEPTOR(int, pthread_join, void *th, void **retval) {
   ENSURE_MSAN_INITED();
   int res = REAL(pthread_join)(th, retval);
@@ -1634,6 +1639,11 @@
   INTERCEPT_FUNCTION(pthread_create);
 #endif
   INTERCEPT_FUNCTION(pthread_key_create);
+
+#if SANITIZER_NETBSD
+  INTERCEPT_FUNCTION(__libc_thr_keycreate);
+#endif
+
   INTERCEPT_FUNCTION(pthread_join);
   INTERCEPT_FUNCTION(tzset);
   INTERCEPT_FUNCTION(__cxa_atexit);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40767.125658.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171206/d469689c/attachment.bin>


More information about the llvm-commits mailing list