diff options
author | Maxim Ostapenko <chefmax7@gmail.com> | 2017-04-11 14:58:26 +0000 |
---|---|---|
committer | Maxim Ostapenko <chefmax7@gmail.com> | 2017-04-11 14:58:26 +0000 |
commit | 8d8e5f3b6c3f6c74c0ddcdbdd169ffe3fefadfe3 (patch) | |
tree | 1d7b57f83768f06bbdc6cfcf5833b16fc4ede564 /lib/asan/tests | |
parent | 056881d0b45d6148ab00fa12cb58cd75e4f64e48 (diff) |
Reapply "Enable LSan for arm Linux"
This patch reapplies r299923 with typo fixed in BLX macros.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/tests')
-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) |