summaryrefslogtreecommitdiff
path: root/lib/msan/msan_interceptors.cc
diff options
context:
space:
mode:
authorSagar Thakur <sagar.thakur@imgtec.com>2016-02-26 05:56:54 +0000
committerSagar Thakur <sagar.thakur@imgtec.com>2016-02-26 05:56:54 +0000
commit6dfeef05e82f0b683be21d8ae49e92881efcad2f (patch)
tree80f2487f0ffcfcb03df49892c5f8aa926deba313 /lib/msan/msan_interceptors.cc
parent637ea58edc2dceb16b7b5f1fd4c90de408ee9833 (diff)
[MSAN] Fix test SmallPreAllocatedStackThread for MIPS
Summary: 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. Reviewers: eugenis, samsonov Subscribers: llvm-commits, mohit.bhakkad, jaydeep Differential: http://reviews.llvm.org/D17603 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan_interceptors.cc')
-rw-r--r--lib/msan/msan_interceptors.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/msan/msan_interceptors.cc b/lib/msan/msan_interceptors.cc
index 26e3eb426..1683a886e 100644
--- a/lib/msan/msan_interceptors.cc
+++ b/lib/msan/msan_interceptors.cc
@@ -1629,7 +1629,11 @@ void InitializeInterceptors() {
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);