diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index fb1cdc7a0b0..2075046473a 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -259,6 +259,9 @@ if (current_os == "win") { use_flutter_cxx = is_clang && ((is_asan && is_mac) || is_msan || is_tsan || is_ios) +using_sanitizer = !is_win && (is_asan || is_hwasan || is_lsan || is_msan || + is_tsan || is_ubsan) + # ============================================================================= # TARGET DEFAULTS # ============================================================================= @@ -511,6 +514,7 @@ foreach(_target_type, deps = [] } if (!defined(invoker.no_default_deps) || !invoker.no_default_deps) { + deps += [ "//build/config/sanitizers:deps" ] if (use_flutter_cxx) { deps += [ "//third_party/libcxx" ] } @@ -653,7 +657,7 @@ if (!is_shared_library) { if (!defined(deps)) { deps = [] } - + deps += [ "//build/config/sanitizers:deps" ] if (use_flutter_cxx) { deps += [ "//third_party/libcxx" ] } diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 4e72c0206bf..baa52f020a4 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -38,11 +38,6 @@ config("default_include_dirs") { ] } -if (!is_win) { - using_sanitizer = - is_asan || is_hwasan || is_lsan || is_msan || is_tsan || is_ubsan -} - # compiler --------------------------------------------------------------------- # # Base compiler configuration. diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn index 18d5f9b0850..5b8d4edfcb6 100644 --- a/build/config/sanitizers/BUILD.gn +++ b/build/config/sanitizers/BUILD.gn @@ -6,42 +6,16 @@ import("//build/config/sanitizers/sanitizers.gni") # Contains the dependencies needed for sanitizers to link into executables and # shared_libraries. Unconditionally depend upon this target as it is empty if -# |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false. +# |using_sanitizer| is false. group("deps") { - deps = [ "//third_party/instrumented_libraries:deps" ] - if (is_asan || is_hwasan || is_lsan || is_msan || is_tsan || is_ubsan) { + if (using_sanitizer) { public_configs = [ ":sanitizer_options_link_helper" ] - deps += [ ":options_sources" ] - } - if (use_custom_libcxx) { - deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ] + deps = [ ":options_sources" ] } } config("sanitizer_options_link_helper") { ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] - if (is_asan) { - ldflags += [ "-fsanitize=address" ] - } - if (is_hwasan && is_android && current_cpu == "arm64") { - ldflags += [ "-fsanitize=hwaddress" ] - } - if (is_lsan) { - ldflags += [ "-fsanitize=leak" ] - } - if (is_msan) { - ldflags += [ "-fsanitize=memory" ] - } - if (is_tsan) { - ldflags += [ "-fsanitize=thread" ] - } - if (is_ubsan) { - ldflags += [ - "-fsanitize=undefined", - "-fsanitize=float-divide-by-zero", - "-fsanitize=float-cast-overflow", - ] - } } source_set("options_sources") { @@ -49,17 +23,6 @@ source_set("options_sources") { ":deps", "//:gn_visibility", ] + include_dirs = [ "../../../runtime" ] sources = [ "//build/sanitizers/sanitizer_options.cc" ] - - if (is_asan) { - sources += [ "//build/sanitizers/asan_suppressions.cc" ] - } - - if (is_lsan) { - sources += [ "//build/sanitizers/lsan_suppressions.cc" ] - } - - if (is_tsan) { - sources += [ "//build/sanitizers/tsan_suppressions.cc" ] - } } diff --git a/build/sanitizers/BUILD.gn b/build/sanitizers/BUILD.gn deleted file mode 100644 index e9f8c7a55cd..00000000000 --- a/build/sanitizers/BUILD.gn +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2015 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -if (is_linux && !is_chromeos) { - # TODO(GYP): Figure out which of these work and are needed on other platforms. - copy("copy_llvm_symbolizer") { - if (is_win) { - sources = [ "//buildtools/win-x64/clang/bin/llvm-symbolizer.exe" ] - outputs = [ "$root_out_dir/llvm-symbolizer.exe" ] - } else { - sources = [ "//buildtools/win-x64/clang/bin/llvm-symbolizer" ] - outputs = [ "$root_out_dir/llvm-symbolizer" ] - } - } -} diff --git a/build/sanitizers/asan_suppressions.cc b/build/sanitizers/asan_suppressions.cc deleted file mode 100644 index df94bc89503..00000000000 --- a/build/sanitizers/asan_suppressions.cc +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file contains the default suppressions for AddressSanitizer. -// It should only be used under very limited circumstances such as suppressing -// a report caused by an interceptor call in a system-installed library. - -#if defined(ADDRESS_SANITIZER) - -// Please make sure the code below declares a single string variable -// kASanDefaultSuppressions which contains ASan suppressions delimited by -// newlines. -char kASanDefaultSuppressions[] = -// http://crbug.com/178677 -"interceptor_via_lib:libsqlite3.so\n" - -// PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS. - -// End of suppressions. -; // Please keep this semicolon. - -#endif // ADDRESS_SANITIZER diff --git a/build/sanitizers/lsan_suppressions.cc b/build/sanitizers/lsan_suppressions.cc deleted file mode 100644 index fdc2c1cfe78..00000000000 --- a/build/sanitizers/lsan_suppressions.cc +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file contains the default suppressions for LeakSanitizer. -// You can also pass additional suppressions via LSAN_OPTIONS: -// LSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to -// http://dev.chromium.org/developers/testing/leaksanitizer for more info. - -#if defined(LEAK_SANITIZER) - -// Please make sure the code below declares a single string variable -// kLSanDefaultSuppressions which contains LSan suppressions delimited by -// newlines. See http://dev.chromium.org/developers/testing/leaksanitizer -// for the instructions on writing suppressions. -char kLSanDefaultSuppressions[] = -// Intentional leak used as sanity test for Valgrind/memcheck. -"leak:base::ToolsSanityTest_MemoryLeak_Test::TestBody\n" - -// ================ Leaks in third-party code ================ - -// False positives in libfontconfig. http://crbug.com/39050 -"leak:libfontconfig\n" - -// Leaks in Nvidia's libGL. -"leak:libGL.so\n" - -// A small leak in V8. http://crbug.com/46571#c9 -"leak:blink::V8GCController::collectGarbage\n" - -// TODO(earthdok): revisit NSS suppressions after the switch to BoringSSL -// NSS leaks in CertDatabaseNSSTest tests. http://crbug.com/51988 -"leak:net::NSSCertDatabase::ImportFromPKCS12\n" -"leak:net::NSSCertDatabase::ListCerts\n" -"leak:net::NSSCertDatabase::DeleteCertAndKey\n" -"leak:crypto::ScopedTestNSSDB::ScopedTestNSSDB\n" -// Another leak due to not shutting down NSS properly. http://crbug.com/124445 -"leak:error_get_my_stack\n" -// The NSS suppressions above will not fire when the fast stack unwinder is -// used, because it can't unwind through NSS libraries. Apply blanket -// suppressions for now. -"leak:libnssutil3\n" -"leak:libnspr4\n" -"leak:libnss3\n" -"leak:libplds4\n" -"leak:libnssckbi\n" - -// XRandR has several one time leaks. -"leak:libxrandr\n" - -// xrandr leak. http://crbug.com/119677 -"leak:XRRFindDisplay\n" - -// Suppressions for objects which can be owned by the V8 heap. This is a -// temporary workaround until LeakSanitizer supports the V8 heap. -// Those should only fire in (browser)tests. If you see one of them in Chrome, -// then it's a real leak. -// http://crbug.com/328552 -"leak:WTF::StringImpl::createUninitialized\n" -"leak:WTF::StringImpl::create8BitIfPossible\n" -"leak:blink::MouseEvent::create\n" -"leak:blink::*::*GetterCallback\n" -"leak:blink::CSSComputedStyleDeclaration::create\n" -"leak:blink::V8PerIsolateData::ensureDomInJSContext\n" -"leak:gin/object_template_builder.h\n" -"leak:gin::internal::Dispatcher\n" -"leak:blink::LocalDOMWindow::getComputedStyle\n" -// This should really be RemoteDOMWindow::create, but symbolization is -// weird in release builds. https://crbug.com/484760 -"leak:blink::RemoteFrame::create\n" -// Likewise, this should really be blink::WindowProxy::initializeIfNeeded. -// https://crbug.com/484760 -"leak:blink::WindowProxy::createContext\n" - -// http://crbug.com/356785 -"leak:content::RenderViewImplTest_DecideNavigationPolicyForWebUI_Test::TestBody\n" - -// ================ Leaks in Chromium code ================ -// PLEASE DO NOT ADD SUPPRESSIONS FOR NEW LEAKS. -// Instead, commits that introduce memory leaks should be reverted. Suppressing -// the leak is acceptable in some cases when reverting is impossible, i.e. when -// enabling leak detection for the first time for a test target with -// preexisting leaks. - -// Small test-only leak in ppapi_unittests. http://crbug.com/258113 -"leak:ppapi::proxy::PPP_Instance_Private_ProxyTest_PPPInstancePrivate_Test\n" - -// http://crbug.com/322671 -"leak:content::SpeechRecognitionBrowserTest::SetUpOnMainThread\n" - -// http://crbug.com/355641 -"leak:TrayAccessibilityTest\n" - -// http://crbug.com/354644 -"leak:CertificateViewerUITest::ShowModalCertificateViewer\n" - -// http://crbug.com/356306 -"leak:content::SetProcessTitleFromCommandLine\n" - -// http://crbug.com/506433 -"leak:blink::ResourceFetcher::garbageCollectDocumentResources\n" - -// PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS. - -// End of suppressions. -; // Please keep this semicolon. - -#endif // LEAK_SANITIZER diff --git a/build/sanitizers/sanitizer_options.cc b/build/sanitizers/sanitizer_options.cc index a659a22caa5..6be233ddf4a 100644 --- a/build/sanitizers/sanitizer_options.cc +++ b/build/sanitizers/sanitizer_options.cc @@ -1,164 +1,35 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// This file contains the default options for various compiler-based dynamic -// tools. +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. -#include "build/build_config.h" +#include "platform/thread_sanitizer.h" -#if defined(ADDRESS_SANITIZER) && defined(OS_MACOSX) -#include // for _NSGetArgc, _NSGetArgv -#include -#endif // ADDRESS_SANITIZER && OS_MACOSX - -#if defined(ADDRESS_SANITIZER) || defined(LEAK_SANITIZER) || \ - defined(MEMORY_SANITIZER) || defined(THREAD_SANITIZER) +#if defined(USING_THREAD_SANITIZER) // Functions returning default options are declared weak in the tools' runtime // libraries. To make the linker pick the strong replacements for those // functions from this module, we explicitly force its inclusion by passing // -Wl,-u_sanitizer_options_link_helper -extern "C" -void _sanitizer_options_link_helper() { } +extern "C" void _sanitizer_options_link_helper() {} // The callbacks we define here will be called from the sanitizer runtime, but -// aren't referenced from the Chrome executable. We must ensure that those +// aren't referenced from the Dart binaries. We must ensure that those // callbacks are not sanitizer-instrumented, and that they aren't stripped by // the linker. -#define SANITIZER_HOOK_ATTRIBUTE \ - extern "C" \ - __attribute__((no_sanitize_address)) \ - __attribute__((no_sanitize_memory)) \ - __attribute__((no_sanitize_thread)) \ - __attribute__((visibility("default"))) \ - __attribute__((used)) +#define SANITIZER_HOOK_ATTRIBUTE \ + extern "C" __attribute__((no_sanitize_address)) \ + __attribute__((no_sanitize_memory)) __attribute__((no_sanitize_thread)) \ + __attribute__((visibility("default"))) __attribute__((used)) #endif -#if defined(ADDRESS_SANITIZER) -// Default options for AddressSanitizer in various configurations: -// malloc_context_size=5 - limit the size of stack traces collected by ASan -// for each malloc/free by 5 frames. These stack traces tend to accumulate -// very fast in applications using JIT (v8 in Chrome's case), see -// https://code.google.com/p/address-sanitizer/issues/detail?id=177 -// symbolize=false - disable the in-process symbolization, which isn't 100% -// compatible with the existing sandboxes and doesn't make much sense for -// stripped official binaries. -// legacy_pthread_cond=1 - run in the libpthread 2.2.5 compatibility mode to -// work around libGL.so using the obsolete API, see -// http://crbug.com/341805. This may break if pthread_cond_t objects are -// accessed by both instrumented and non-instrumented binaries (e.g. if -// they reside in shared memory). This option is going to be deprecated in -// upstream AddressSanitizer and must not be used anywhere except the -// official builds. -// check_printf=1 - check the memory accesses to printf (and other formatted -// output routines) arguments. -// use_sigaltstack=1 - handle signals on an alternate signal stack. Useful -// for stack overflow detection. -// strip_path_prefix=Release/../../ - prefixes up to and including this -// substring will be stripped from source file paths in symbolized reports -// (if symbolize=true, which is set when running with LeakSanitizer). -// fast_unwind_on_fatal=1 - use the fast (frame-pointer-based) stack unwinder -// to print error reports. V8 doesn't generate debug info for the JIT code, -// so the slow unwinder may not work properly. -// detect_stack_use_after_return=1 - use fake stack to delay the reuse of -// stack allocations and detect stack-use-after-return errors. -#if defined(OS_LINUX) -#if defined(GOOGLE_CHROME_BUILD) -// Default AddressSanitizer options for the official build. These do not affect -// tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official -// Chromium builds. -const char kAsanDefaultOptions[] = - "legacy_pthread_cond=1 malloc_context_size=5 " - "symbolize=false check_printf=1 use_sigaltstack=1 detect_leaks=0 " - "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1"; -#else -// Default AddressSanitizer options for buildbots and non-official builds. -const char *kAsanDefaultOptions = - "symbolize=false check_printf=1 use_sigaltstack=1 " - "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " - "detect_stack_use_after_return=1 "; -#endif // GOOGLE_CHROME_BUILD - -#elif defined(OS_MACOSX) -const char *kAsanDefaultOptions = - "check_printf=1 use_sigaltstack=1 " - "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " - "detect_stack_use_after_return=1 detect_odr_violation=0 "; -static const char kNaClDefaultOptions[] = "handle_segv=0"; -static const char kNaClFlag[] = "--type=nacl-loader"; -#endif // OS_LINUX - -#if defined(OS_LINUX) || defined(OS_MACOSX) -SANITIZER_HOOK_ATTRIBUTE const char *__asan_default_options() { -#if defined(OS_MACOSX) - char*** argvp = _NSGetArgv(); - int* argcp = _NSGetArgc(); - if (!argvp || !argcp) return kAsanDefaultOptions; - char** argv = *argvp; - int argc = *argcp; - for (int i = 0; i < argc; ++i) { - if (strcmp(argv[i], kNaClFlag) == 0) { - return kNaClDefaultOptions; - } - } -#endif - return kAsanDefaultOptions; +#if defined(USING_THREAD_SANITIZER) && defined(DART_HOST_OS_LINUX) +SANITIZER_HOOK_ATTRIBUTE const char* __tsan_default_suppressions() { + // See https://github.com/google/sanitizers/wiki/threadsanitizersuppressions + return R"( +# False positive in libc's tzset_internal (see http://dartbug.com/54064). +# In some environments tzset_internal is not symbolized correctly so we +# also suppress the closest caller which is properly symbolized. +race:tzset_internal +race:dart::DN_HelperDateTime_timeZoneOffsetInSeconds +)"; } - -extern "C" char kASanDefaultSuppressions[]; - -SANITIZER_HOOK_ATTRIBUTE const char *__asan_default_suppressions() { - return kASanDefaultSuppressions; -} -#endif // OS_LINUX || OS_MACOSX -#endif // ADDRESS_SANITIZER - -#if defined(THREAD_SANITIZER) && defined(OS_LINUX) -// Default options for ThreadSanitizer in various configurations: -// detect_deadlocks=1 - enable deadlock (lock inversion) detection. -// second_deadlock_stack=1 - more verbose deadlock reports. -// report_signal_unsafe=0 - do not report async-signal-unsafe functions -// called from signal handlers. -// report_thread_leaks=0 - do not report unjoined threads at the end of -// the program execution. -// print_suppressions=1 - print the list of matched suppressions. -// history_size=7 - make the history buffer proportional to 2^7 (the maximum -// value) to keep more stack traces. -// strip_path_prefix=Release/../../ - prefixes up to and including this -// substring will be stripped from source file paths in symbolized reports. -const char kTsanDefaultOptions[] = - "detect_deadlocks=1 second_deadlock_stack=1 report_signal_unsafe=0 " - "report_thread_leaks=0 print_suppressions=1 history_size=7 " - "strip_path_prefix=Release/../../ "; - -SANITIZER_HOOK_ATTRIBUTE const char *__tsan_default_options() { - return kTsanDefaultOptions; -} - -extern "C" char kTSanDefaultSuppressions[]; - -SANITIZER_HOOK_ATTRIBUTE const char *__tsan_default_suppressions() { - return kTSanDefaultSuppressions; -} - -#endif // THREAD_SANITIZER && OS_LINUX - -#if defined(LEAK_SANITIZER) -// Default options for LeakSanitizer: -// print_suppressions=1 - print the list of matched suppressions. -// strip_path_prefix=Release/../../ - prefixes up to and including this -// substring will be stripped from source file paths in symbolized reports. -const char kLsanDefaultOptions[] = - "print_suppressions=1 strip_path_prefix=Release/../../ "; - -SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_options() { - return kLsanDefaultOptions; -} - -extern "C" char kLSanDefaultSuppressions[]; - -SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_suppressions() { - return kLSanDefaultSuppressions; -} - -#endif // LEAK_SANITIZER +#endif // defined(USING_THREAD_SANITIZER) && defined(DART_HOST_OS_LINUX) diff --git a/build/sanitizers/tsan_suppressions.cc b/build/sanitizers/tsan_suppressions.cc deleted file mode 100644 index 9a3fb8764dd..00000000000 --- a/build/sanitizers/tsan_suppressions.cc +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file contains the default suppressions for ThreadSanitizer. -// You can also pass additional suppressions via TSAN_OPTIONS: -// TSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to -// http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2 -// for more info. - -#if defined(THREAD_SANITIZER) - -// Please make sure the code below declares a single string variable -// kTSanDefaultSuppressions contains TSan suppressions delimited by newlines. -// See http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2 -// for the instructions on writing suppressions. -char kTSanDefaultSuppressions[] = -// False positives in libflashplayer.so and libglib.so. Since we don't -// instrument them, we cannot reason about the synchronization in them. -"race:libflashplayer.so\n" -"race:libglib*.so\n" - -// Intentional race in ToolsSanityTest.DataRace in base_unittests. -"race:base/tools_sanity_unittest.cc\n" - -// Data race on WatchdogCounter [test-only]. -"race:base/threading/watchdog_unittest.cc\n" - -// Races in libevent, http://crbug.com/23244. -"race:libevent/event.c\n" - -// http://crbug.com/46840. -"race:base::HistogramSamples::IncreaseSum\n" -"race:base::Histogram::Add\n" -"race:base::HistogramSamples::Add\n" - -// http://crbug.com/84094. -"race:sqlite3StatusSet\n" -"race:pcache1EnforceMaxPage\n" -"race:pcache1AllocPage\n" - -// http://crbug.com/102327. -// Test-only race, won't fix. -"race:tracked_objects::ThreadData::ShutdownSingleThreadedCleanup\n" - -// http://crbug.com/115540 -"race:*GetCurrentThreadIdentifier\n" - -// http://crbug.com/120808 -"race:base/threading/watchdog.cc\n" - -// http://crbug.com/157586 -"race:third_party/libvpx_new/source/libvpx/vp8/decoder/threading.c\n" - -// http://crbug.com/158718 -"race:third_party/ffmpeg/libavcodec/pthread.c\n" -"race:third_party/ffmpeg/libavcodec/pthread_frame.c\n" -"race:third_party/ffmpeg/libavcodec/vp8.c\n" -"race:third_party/ffmpeg/libavutil/mem.c\n" -"race:*HashFrameForTesting\n" -"race:third_party/ffmpeg/libavcodec/h264pred.c\n" -"race:media::ReleaseData\n" - -// http://crbug.com/158922 -"race:third_party/libvpx_new/source/libvpx/vp8/encoder/*\n" -"race:third_party/libvpx_new/source/libvpx/vp9/encoder/*\n" - -// http://crbug.com/189177 -"race:thread_manager\n" -"race:v8::Locker::Initialize\n" - -// http://crbug.com/239359 -"race:media::TestInputCallback::OnData\n" - -// http://crbug.com/244368 -"race:skia::BeginPlatformPaint\n" - -// http://crbug.com/244385 -"race:unixTempFileDir\n" - -// http://crbug.com/244755 -"race:v8::internal::Zone::NewExpand\n" -"race:TooLateToEnableNow\n" -"race:adjust_segment_bytes_allocated\n" - -// http://crbug.com/244774 -"race:webrtc::RTPReceiver::ProcessBitrate\n" -"race:webrtc::RTPSender::ProcessBitrate\n" -"race:webrtc::VideoCodingModuleImpl::Decode\n" -"race:webrtc::RTPSender::SendOutgoingData\n" -"race:webrtc::VP8EncoderImpl::GetEncodedPartitions\n" -"race:webrtc::VP8EncoderImpl::Encode\n" -"race:webrtc::ViEEncoder::DeliverFrame\n" -"race:webrtc::vcm::VideoReceiver::Decode\n" -"race:webrtc::VCMReceiver::FrameForDecoding\n" -"race:*trace_event_unique_catstatic*\n" - -// http://crbug.com/244856 -"race:AutoPulseLock\n" - -// http://crbug.com/246968 -"race:webrtc::VideoCodingModuleImpl::RegisterPacketRequestCallback\n" - -// http://crbug.com/246974 -"race:content::GpuWatchdogThread::CheckArmed\n" - -// http://crbug.com/257396 -"race:base::trace_event::" - "TraceEventTestFixture_TraceSamplingScope_Test::TestBody\n" - -// http://crbug.com/258479 -"race:SamplingStateScope\n" -"race:g_trace_state\n" - -// http://crbug.com/258499 -"race:third_party/skia/include/core/SkRefCnt.h\n" - -// http://crbug.com/268924 -"race:base::g_power_monitor\n" -"race:base::PowerMonitor::PowerMonitor\n" -"race:base::PowerMonitor::AddObserver\n" -"race:base::PowerMonitor::RemoveObserver\n" -"race:base::PowerMonitor::IsOnBatteryPower\n" - -// http://crbug.com/258935 -"race:base::Thread::StopSoon\n" - -// http://crbug.com/268941 -"race:tracked_objects::ThreadData::tls_index_\n" - -// http://crbug.com/272095 -"race:base::g_top_manager\n" - -// http://crbug.com/273047 -"race:base::*::g_lazy_tls_ptr\n" -"race:IPC::SyncChannel::ReceivedSyncMsgQueue::lazy_tls_ptr_\n" - -// http://crbug.com/280466 -"race:content::WebRtcAudioCapturer::SetCapturerSource\n" - -// http://crbug.com/285242 -"race:media::PulseAudioOutputStream::SetVolume\n" - -// http://crbug.com/308590 -"race:CustomThreadWatcher::~CustomThreadWatcher\n" - -// http://crbug.com/310851 -"race:net::ProxyResolverV8Tracing::Job::~Job\n" - -// http://crbug.com/313726 -"race:CallbackWasCalled\n" - -// http://crbug.com/327330 -"race:PrepareTextureMailbox\n" -"race:cc::LayerTreeHost::PaintLayerContents\n" - -// http://crbug.com/476529 -"deadlock:cc::VideoLayerImpl::WillDraw\n" - -// http://crbug.com/328826 -"race:gLCDOrder\n" -"race:gLCDOrientation\n" - -// http://crbug.com/328868 -"race:PR_Lock\n" - -// http://crbug.com/329225 -"race:blink::currentTimeFunction\n" - -// http://crbug.com/329460 -"race:extensions::InfoMap::AddExtension\n" - -// http://crbug.com/333244 -"race:content::" - "VideoCaptureImplTest::MockVideoCaptureImpl::~MockVideoCaptureImpl\n" - -// http://crbug.com/333871 -"race:v8::internal::Interface::NewValue()::value_interface\n" -"race:v8::internal::IsMinusZero(double)::minus_zero\n" -"race:v8::internal::FastCloneShallowObjectStub::InitializeInterfaceDescriptor\n" -"race:v8::internal::KeyedLoadStubCompiler::registers\n" -"race:v8::internal::KeyedStoreStubCompiler::registers()::registers\n" -"race:v8::internal::KeyedLoadFastElementStub::InitializeInterfaceDescriptor\n" -"race:v8::internal::KeyedStoreFastElementStub::InitializeInterfaceDescriptor\n" -"race:v8::internal::LoadStubCompiler::registers\n" -"race:v8::internal::StoreStubCompiler::registers\n" -"race:v8::internal::HValue::LoopWeight\n" - -// http://crbug.com/334140 -"race:CommandLine::HasSwitch\n" -"race:CommandLine::current_process_commandline_\n" -"race:CommandLine::GetSwitchValueASCII\n" - -// http://crbug.com/338675 -"race:blink::s_platform\n" -"race:content::" - "RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl\n" - -// http://crbug.com/345240 -"race:WTF::s_shutdown\n" - -// http://crbug.com/345245 -"race:jingle_glue::JingleThreadWrapper::~JingleThreadWrapper\n" -"race:webrtc::voe::Channel::UpdatePacketDelay\n" -"race:webrtc::voe::Channel::GetDelayEstimate\n" -"race:webrtc::VCMCodecDataBase::DeregisterReceiveCodec\n" -"race:webrtc::GainControlImpl::set_stream_analog_level\n" - -// http://crbug.com/345618 -"race:WebCore::AudioDestinationNode::render\n" - -// http://crbug.com/345624 -"race:media::DataSource::set_host\n" - -// http://crbug.com/347534 -"race:v8::internal::V8::TearDown\n" - -// http://crbug.com/347538 -"race:sctp_timer_start\n" - -// http://crbug.com/347548 -"race:cricket::WebRtcVideoMediaChannel::MaybeResetVieSendCodec\n" -"race:cricket::WebRtcVideoMediaChannel::SetSendCodec\n" - -// http://crbug.com/347553 -"race:blink::WebString::reset\n" - -// http://crbug.com/348511 -"race:webrtc::acm1::AudioCodingModuleImpl::PlayoutData10Ms\n" - -// http://crbug.com/348982 -"race:cricket::P2PTransportChannel::OnConnectionDestroyed\n" -"race:cricket::P2PTransportChannel::AddConnection\n" - -// http://crbug.com/348984 -"race:sctp_express_handle_sack\n" -"race:system_base_info\n" - -// http://crbug.com/363999 -"race:v8::internal::EnterDebugger::*EnterDebugger\n" - -// https://code.google.com/p/v8/issues/detail?id=3143 -"race:v8::internal::FLAG_track_double_fields\n" - -// https://crbug.com/369257 -// TODO(mtklein): annotate properly and remove suppressions. -"race:SandboxIPCHandler::HandleFontMatchRequest\n" -"race:SkFontConfigInterfaceDirect::matchFamilyName\n" -"race:SkFontConfigInterface::GetSingletonDirectInterface\n" -"race:FcStrStaticName\n" - -// http://crbug.com/372807 -"deadlock:net::X509Certificate::CreateCertificateListFromBytes\n" -"deadlock:net::X509Certificate::CreateFromBytes\n" -"deadlock:net::SSLClientSocketNSS::Core::DoHandshakeLoop\n" - -// http://crbug.com/374135 -"race:media::AlsaWrapper::PcmWritei\n" - -// False positive in libc's tzset_internal, http://crbug.com/379738. -"race:tzset_internal\n" - -// http://crbug.com/380554 -"deadlock:g_type_add_interface_static\n" - -// http://crbug.com/386385 -"race:content::AppCacheStorageImpl::DatabaseTask::CallRunCompleted\n" - -// http://crbug.com/388730 -"race:g_next_user_script_id\n" - -// http://crbug.com/389098 -"race:webrtc::voe::TransmitMixer::EnableStereoChannelSwapping\n" - -// http://crbug.com/397022 -"deadlock:" -"base::trace_event::TraceEventTestFixture_ThreadOnceBlocking_Test::TestBody\n" - -// http://crbug.com/415472 -"deadlock:base::trace_event::TraceLog::GetCategoryGroupEnabled\n" - -// http://crbug.com/490856 -"deadlock:content::TracingControllerImpl::SetEnabledOnFileThread\n" - -// http://crbug.com/417193 -// Suppressing both AudioContext.{cpp,h}. -"race:modules/webaudio/AudioContext\n" - -// https://code.google.com/p/skia/issues/detail?id=3294 -"race:SkBaseMutex::acquire\n" - -// https://crbug.com/430533 -"race:TileTaskGraphRunner::Run\n" - -// https://crbug.com/448203 -"race:blink::RemoteFrame::detach\n" - -// https://crbug.com/454652 -"race:net::NetworkChangeNotifier::SetTestNotificationsOnly\n" - -// https://crbug.com/455638 -"deadlock:dbus::Bus::ShutdownAndBlock\n" - -// https://crbug.com/455665 -"race:mojo::common::*::tick_clock\n" -"race:mojo::common::internal::NowTicks\n" -"race:tracked_objects::ThreadData::InitializeThreadContext\n" - -// https://crbug.com/459429 -"race:randomnessPid\n" - -// https://crbug.com/454655 -"race:content::BrowserTestBase::PostTaskToInProcessRendererAndWait\n" - -// End of suppressions. -; // Please keep this semicolon. - -#endif // THREAD_SANITIZER diff --git a/runtime/platform/BUILD.gn b/runtime/platform/BUILD.gn index 0b229b58ee3..7f319e92f9d 100644 --- a/runtime/platform/BUILD.gn +++ b/runtime/platform/BUILD.gn @@ -29,10 +29,8 @@ config("no_tsan_config") { library_for_all_configs("libdart_platform_no_tsan") { target_type = "source_set" - public_configs = [ - "../vm:libdart_vm_config", - ":no_tsan_config", - ] + public_configs = [ "../vm:libdart_vm_config" ] + extra_configs = [ ":no_tsan_config" ] sources = [ "no_tsan.cc", "no_tsan.h",