diff options
author | Maxim Ostapenko <chefmax7@gmail.com> | 2017-04-11 08:13:38 +0000 |
---|---|---|
committer | Maxim Ostapenko <chefmax7@gmail.com> | 2017-04-11 08:13:38 +0000 |
commit | 77094f117908a9b2f3b2cb4ebe5dbf6c744a851d (patch) | |
tree | dfb7edbdacf51c1c19728eeec5dce0d8e4f90840 /lib/asan/tests/asan_test.cc | |
parent | 769089a0ba7eaefe9d6670fa2c49850e50151364 (diff) |
[lsan] Enable LSan for arm Linux
This patch enables LSan for arm Linux.
Differential Revision: https://reviews.llvm.org/D29586
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/tests/asan_test.cc')
-rw-r--r-- | lib/asan/tests/asan_test.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/asan/tests/asan_test.cc b/lib/asan/tests/asan_test.cc index 31215cf56..7ac72955f 100644 --- a/lib/asan/tests/asan_test.cc +++ b/lib/asan/tests/asan_test.cc @@ -685,6 +685,7 @@ void *ThreadStackReuseFunc2(void *unused) { return 0; } +#if !defined(__thumb__) TEST(AddressSanitizer, ThreadStackReuseTest) { pthread_t t; PTHREAD_CREATE(&t, 0, ThreadStackReuseFunc1, 0); @@ -692,6 +693,7 @@ TEST(AddressSanitizer, ThreadStackReuseTest) { PTHREAD_CREATE(&t, 0, ThreadStackReuseFunc2, 0); PTHREAD_JOIN(t, 0); } +#endif #if defined(__SSE2__) #include <emmintrin.h> @@ -1091,6 +1093,11 @@ TEST(AddressSanitizer, ThreadedStressStackReuseTest) { } } +// pthread_exit tries to perform unwinding stuff that leads to dlopen'ing +// libgcc_s.so. dlopen in its turn calls malloc to store "libgcc_s.so" string +// that confuses LSan on Thumb because it fails to understand that this +// allocation happens in dynamic linker and should be ignored. +#if !defined(__thumb__) static void *PthreadExit(void *a) { pthread_exit(0); return 0; @@ -1103,6 +1110,7 @@ TEST(AddressSanitizer, PthreadExitTest) { PTHREAD_JOIN(t, 0); } } +#endif // FIXME: Why does clang-cl define __EXCEPTIONS? #if defined(__EXCEPTIONS) && !defined(_WIN32) |