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

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 14 01:49:54 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL351040: [asan] Add fallback for Thumb after r350139 (authored by rovka, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D56594?vs=181245&id=181503#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56594/new/

https://reviews.llvm.org/D56594

Files:
  compiler-rt/trunk/lib/asan/asan_rtl.cc
  compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cc
  compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc


Index: compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cc
===================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cc
+++ compiler-rt/trunk/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: compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc
===================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc
+++ compiler-rt/trunk/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: compiler-rt/trunk/lib/asan/asan_rtl.cc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_rtl.cc
+++ compiler-rt/trunk/lib/asan/asan_rtl.cc
@@ -383,12 +383,18 @@
           kHighShadowBeg > kMidMemEnd);
 }
 
+#if defined(__thumb__) && defined(__linux__)
+#define START_BACKGROUND_THREAD_IN_ASAN_INTERNAL
+#endif
+
+#ifndef START_BACKGROUND_THREAD_IN_ASAN_INTERNAL
 static bool UNUSED __local_asan_dyninit = [] {
   MaybeStartBackgroudThread();
   SetSoftRssLimitExceededCallback(AsanSoftRssLimitExceededCallback);
 
   return false;
 }();
+#endif
 
 static void AsanInitInternal() {
   if (LIKELY(asan_inited)) return;
@@ -464,6 +470,11 @@
   allocator_options.SetFrom(flags(), common_flags());
   InitializeAllocator(allocator_options);
 
+#ifdef START_BACKGROUND_THREAD_IN_ASAN_INTERNAL
+  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.181503.patch
Type: text/x-patch
Size: 2198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190114/0e555d91/attachment-0001.bin>


More information about the llvm-commits mailing list