[PATCH] D17603: [MSAN] Fix test SmallPreAllocatedStackThread for MIPS

Sagar Thakur via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 04:56:02 PST 2016


sagar created this revision.
sagar added reviewers: eugenis, sam.saariste.
sagar added subscribers: jaydeep, mohit.bhakkad, llvm-commits.
sagar set the repository for this revision to rL LLVM.

Msan was intercepting version 2.1 of the pthread_create function which was making it to crash in libc because __pthread_create_2_1 modifies the stack attributes of the thread. Intercepting the correct version fixes the test SmallPreAllocatedStackThread.

Repository:
  rL LLVM

http://reviews.llvm.org/D17603

Files:
  lib/msan/msan_interceptors.cc

Index: lib/msan/msan_interceptors.cc
===================================================================
--- lib/msan/msan_interceptors.cc
+++ lib/msan/msan_interceptors.cc
@@ -1628,7 +1628,11 @@
   INTERCEPT_FUNCTION(getrusage);
   INTERCEPT_FUNCTION(sigaction);
   INTERCEPT_FUNCTION(signal);
+#if defined(__mips__)
+  INTERCEPT_FUNCTION_VER(pthread_create, "GLIBC_2.2");
+#else
   INTERCEPT_FUNCTION(pthread_create);
+#endif
   INTERCEPT_FUNCTION(pthread_key_create);
   INTERCEPT_FUNCTION(pthread_join);
   INTERCEPT_FUNCTION(tzset);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17603.49041.patch
Type: text/x-patch
Size: 538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160225/77e1a1f7/attachment.bin>


More information about the llvm-commits mailing list