[compiler-rt] r249307 - [asan][mips] Fix ABI incompatibility crash in pthread_create() following r248325.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 05:43:47 PDT 2015
Author: dsanders
Date: Mon Oct 5 07:43:47 2015
New Revision: 249307
URL: http://llvm.org/viewvc/llvm-project?rev=249307&view=rev
Log:
[asan][mips] Fix ABI incompatibility crash in pthread_create() following r248325.
Like i386, Mips needs a versioned interceptor but must select GLIBC_2.2.
Modified:
compiler-rt/trunk/lib/asan/asan_interceptors.cc
compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc
Modified: compiler-rt/trunk/lib/asan/asan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.cc?rev=249307&r1=249306&r2=249307&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Mon Oct 5 07:43:47 2015
@@ -29,6 +29,8 @@
#if defined(__i386) && SANITIZER_LINUX
#define ASAN_PTHREAD_CREATE_VERSION "GLIBC_2.1"
+#elif defined(__mips__) && SANITIZER_LINUX
+#define ASAN_PTHREAD_CREATE_VERSION "GLIBC_2.2"
#endif
namespace __asan {
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc?rev=249307&r1=249306&r2=249307&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc Mon Oct 5 07:43:47 2015
@@ -3,7 +3,6 @@
// pthread_attr_init is not intercepted and binds to the new abi
// pthread_create is intercepted; dlsym always returns the oldest version.
// This results in a crash inside pthread_create in libc.
-// UNSUPPORTED: mips
#include <pthread.h>
#include <stdlib.h>
More information about the llvm-commits
mailing list