diff options
author | Sagar Thakur <sagar.thakur@imgtec.com> | 2016-05-24 11:11:57 +0000 |
---|---|---|
committer | Sagar Thakur <sagar.thakur@imgtec.com> | 2016-05-24 11:11:57 +0000 |
commit | 14fa9471f305bf3beaccbc87f846a170248af65d (patch) | |
tree | b4a0e031d78763ee0fd1dad932c469ae8874f44c | |
parent | e3b4ef3bf10251dc643ef8a55935111fb89dff7f (diff) | |
download | compiler-rt-14fa9471f305bf3beaccbc87f846a170248af65d.tar.gz |
Merging r261980:
------------------------------------------------------------------------
r261980 | slthakur | 2016-02-26 11:26:54 +0530 (Fri, 26 Feb 2016) | 8 lines
[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/branches/release_38@270549 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/msan/msan_interceptors.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/msan/msan_interceptors.cc b/lib/msan/msan_interceptors.cc index 0db2ac5b2..d38d37337 100644 --- a/lib/msan/msan_interceptors.cc +++ b/lib/msan/msan_interceptors.cc @@ -1628,7 +1628,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); |