[compiler-rt] r247053 - [asan] Disable ThreadSelfTest on Android.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 12:32:38 PDT 2015
Author: eugenis
Date: Tue Sep 8 14:32:37 2015
New Revision: 247053
URL: http://llvm.org/viewvc/llvm-project?rev=247053&view=rev
Log:
[asan] Disable ThreadSelfTest on Android.
Also #ifdef out the implementation of ThreadSelf() and
ThreadSelfOffset() helper functions that are broken and unused on
Android.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=247053&r1=247052&r2=247053&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc Tue Sep 8 14:32:37 2015
@@ -214,7 +214,7 @@ void InitTlsSize() {
#if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \
|| defined(__aarch64__)) \
- && SANITIZER_LINUX
+ && SANITIZER_LINUX && !SANITIZER_ANDROID
// sizeof(struct thread) from glibc.
static atomic_uintptr_t kThreadDescriptorSize;
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc?rev=247053&r1=247052&r2=247053&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc Tue Sep 8 14:32:37 2015
@@ -195,7 +195,7 @@ TEST(SanitizerCommon, SetEnvTest) {
EXPECT_EQ(0, getenv(kEnvName));
}
-#if defined(__x86_64__) || defined(__i386__)
+#if (defined(__x86_64__) || defined(__i386__)) && !SANITIZER_ANDROID
void *thread_self_offset_test_func(void *arg) {
bool result =
*(uptr *)((char *)ThreadSelf() + ThreadSelfOffset()) == ThreadSelf();
More information about the llvm-commits
mailing list