[compiler-rt] 6720779 - [asan] Remove confusing workaround
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 2 11:44:48 PST 2021
Author: Vitaly Buka
Date: 2021-12-02T11:44:40-08:00
New Revision: 67207797e95bbf119199ef95b9eb4c9877a09152
URL: https://github.com/llvm/llvm-project/commit/67207797e95bbf119199ef95b9eb4c9877a09152
DIFF: https://github.com/llvm/llvm-project/commit/67207797e95bbf119199ef95b9eb4c9877a09152.diff
LOG: [asan] Remove confusing workaround
The goal is to identify the bot and try to fix it.
SetSoftRssLimitExceededCallback is AsanInitInternal as I assume
that only MaybeStartBackgroudThread needs to be delayed to constructors.
Later I want to move MaybeStartBackgroudThread call into sanitizer_common.
If it needs to be reverted please provide to more info, like bot, or details about setup.
Reviewed By: kstoimenov
Differential Revision: https://reviews.llvm.org/D114934
Added:
Modified:
compiler-rt/lib/asan/asan_rtl.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_rtl.cpp b/compiler-rt/lib/asan/asan_rtl.cpp
index 5be8ef0f6d1c2..eb60661d9772d 100644
--- a/compiler-rt/lib/asan/asan_rtl.cpp
+++ b/compiler-rt/lib/asan/asan_rtl.cpp
@@ -371,18 +371,10 @@ void PrintAddressSpaceLayout() {
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;
@@ -458,10 +450,7 @@ static void AsanInitInternal() {
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.
More information about the llvm-commits
mailing list