[PATCH] D56594: [asan] Add fallback for Thumb after r350139

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 11 04:52:58 PST 2019


rovka created this revision.
rovka added a reviewer: krytarowski.
Herald added subscribers: fedor.sergeev, kristof.beyls, javed.absar, kubamracek, srhines.

This reverts r350806 which marked some tests as UNSUPPORTED on ARM and
instead reintroduces the old code path only for Thumb, since that seems
to be the only target that broke.

It would still be nice to find the root cause of the breakage, but with
the branch point for LLVM 8.0 scheduled for next week it's better to put
things in a stable state while we investigate.


https://reviews.llvm.org/D56594

Files:
  lib/asan/asan_rtl.cc
  test/asan/TestCases/Linux/quarantine_size_mb.cc
  test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc


Index: test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc
===================================================================
--- test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc
+++ test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc
@@ -16,7 +16,7 @@
 // XFAIL: msan
 // XFAIL: ubsan
 
-// UNSUPPORTED: freebsd, solaris, darwin, arm
+// UNSUPPORTED: freebsd, solaris, darwin
 
 #include <string.h>
 #include <stdio.h>
Index: test/asan/TestCases/Linux/quarantine_size_mb.cc
===================================================================
--- test/asan/TestCases/Linux/quarantine_size_mb.cc
+++ test/asan/TestCases/Linux/quarantine_size_mb.cc
@@ -7,7 +7,7 @@
 // RUN: %env_asan_opts=hard_rss_limit_mb=20                         not  %run %t          2>&1 | FileCheck %s  --check-prefix=RSS_LIMIT
 
 // https://github.com/google/sanitizers/issues/981
-// UNSUPPORTED: android-26, arm
+// UNSUPPORTED: android-26
 
 #include <string.h>
 char *g;
Index: lib/asan/asan_rtl.cc
===================================================================
--- lib/asan/asan_rtl.cc
+++ lib/asan/asan_rtl.cc
@@ -383,12 +383,14 @@
           kHighShadowBeg > kMidMemEnd);
 }
 
+#if !defined(__thumb__)
 static bool UNUSED __local_asan_dyninit = [] {
   MaybeStartBackgroudThread();
   SetSoftRssLimitExceededCallback(AsanSoftRssLimitExceededCallback);
 
   return false;
 }();
+#endif
 
 static void AsanInitInternal() {
   if (LIKELY(asan_inited)) return;
@@ -464,6 +466,11 @@
   allocator_options.SetFrom(flags(), common_flags());
   InitializeAllocator(allocator_options);
 
+#if defined(__thumb__)
+  MaybeStartBackgroudThread();
+  SetSoftRssLimitExceededCallback(AsanSoftRssLimitExceededCallback);
+#endif
+
   // On Linux AsanThread::ThreadStart() calls malloc() that's why asan_inited
   // should be set to 1 prior to initializing the threads.
   asan_inited = 1;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56594.181245.patch
Type: text/x-patch
Size: 1880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190111/db96867d/attachment.bin>


More information about the llvm-commits mailing list