diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-30 15:00:27 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-30 15:00:27 +0000 |
commit | c230ebb41439529643e0b8b73091ff55403393a2 (patch) | |
tree | a12c010fc7e88f9441c92c5b63b85511128a45dc | |
parent | 488949b794e4c64b7d9651a9e56c220d39d1b362 (diff) | |
download | chromium_src-c230ebb41439529643e0b8b73091ff55403393a2.zip chromium_src-c230ebb41439529643e0b8b73091ff55403393a2.tar.gz chromium_src-c230ebb41439529643e0b8b73091ff55403393a2.tar.bz2 |
Link the contents of tools/valgrind/tsan_v2/suppressions.txt into TSan binaries.
BUG=302040
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/296173006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273830 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/base.gyp | 5 | ||||
-rw-r--r-- | base/debug/OWNERS | 1 | ||||
-rw-r--r-- | base/debug/sanitizer_options.cc | 12 | ||||
-rw-r--r-- | base/debug/tsan_suppressions.cc | 301 | ||||
-rw-r--r-- | tools/valgrind/tsan_v2/suppressions.txt | 279 |
5 files changed, 321 insertions, 277 deletions
diff --git a/base/base.gyp b/base/base.gyp index 710c229..cf00752 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -1000,6 +1000,11 @@ '../third_party/libc++/libc++.gyp:libcxx_proxy', ], }], + ['tsan==1', { + 'sources': [ + 'debug/tsan_suppressions.cc', + ], + }], ], 'cflags!': [ '-fsanitize=address', diff --git a/base/debug/OWNERS b/base/debug/OWNERS index 8ae2518..5dcc3e9 100644 --- a/base/debug/OWNERS +++ b/base/debug/OWNERS @@ -2,3 +2,4 @@ per-file sanitizer_options.cc=glider@chromium.org per-file trace_event*=nduca@chromium.org per-file trace_event*=dsinclair@chromium.org per-file trace_event_android.cc=wangxianzhu@chromium.org +per-file tsan_suppressions.cc=* diff --git a/base/debug/sanitizer_options.cc b/base/debug/sanitizer_options.cc index 1affdb2..5357453 100644 --- a/base/debug/sanitizer_options.cc +++ b/base/debug/sanitizer_options.cc @@ -94,4 +94,16 @@ const char *__tsan_default_options() { return kTsanDefaultOptions; } +extern "C" char kTSanDefaultSuppressions[]; + +extern "C" +__attribute__((no_sanitize_thread)) +__attribute__((visibility("default"))) +// The function isn't referenced from the executable itself. Make sure it isn't +// stripped by the linker. +__attribute__((used)) +const char *__tsan_default_suppressions() { + return kTSanDefaultSuppressions; +} + #endif // THREAD_SANITIZER && OS_LINUX diff --git a/base/debug/tsan_suppressions.cc b/base/debug/tsan_suppressions.cc new file mode 100644 index 0000000..6bc44ec --- /dev/null +++ b/base/debug/tsan_suppressions.cc @@ -0,0 +1,301 @@ +// 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/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/source/libvpx/vp8/encoder/*\n" + +// http://crbug.com/189177 +"race:thread_manager\n" +"race:v8::Locker::Initialize\n" + +// http://crbug.com/223352 +"race:uprv_malloc_46\n" +"race:uprv_realloc_46\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/246970 +"race:webrtc::EventPosix::StartTimer\n" + +// http://crbug.com/246974 +"race:content::GpuWatchdogThread::CheckArmed\n" + +// http://crbug.com/257396 +"race:base::debug::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" + +// http://crbug.com/268941 +"race:tracked_objects::ThreadData::tls_index_\n" + +// http://crbug.com/270037 +"race:gLibCleanupFunctions\n" + +// http://crbug.com/272095 +"race:base::g_top_manager\n" + +// http://crbug.com/272987 +"race:webrtc::MediaStreamTrack<webrtc::AudioTrackInterface>::set_enabled\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/290964 +"race:PostponeInterruptsScope\n" +"race:v8::internal::StackGuard::RequestInstallCode\n" + +// http://crbug.com/296883 +"race:net::URLFetcherCore::Stop\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/328804 +"race:v8::internal::Heap::SetStackLimits\n" +"race:ScavengePointer\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/330528 +"race:v8::internal::MarkCompactCollector::SweepInParallel\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/345251 +"race:cc::s_next_layer_id\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" + +// http://crbug.com/350982 +"race:libvpx/vp9/decoder/vp9_thread.c\n" + +// http://crbug.com/361790 +"race:workerGlobalScopeDestroyed\n" + +// http://crbug.com/363999 +"race:v8::internal::EnterDebugger::*EnterDebugger\n" + +// http://crbug.com/364006 +"race:gfx::ImageFamily::~ImageFamily\n" + +// http://crbug.com/364014 +"race:WTF::Latin1Encoding()::globalLatin1Encoding\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" + +// 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" +"deadlock:media::AudioOutputDispatcherImpl::StopStream\n" +"deadlock:media::AudioStreamHandler::AudioStreamContainer::OnMoreData\n" + +// http://crbug.com/374151 +"deadlock:media::FakeAudioConsumer::Worker::DoRead\n" + +// http://crbug.com/377420 +"deadlock:media::AudioRendererMixerInput::Play\n" + +// End of suppressions. +; // Please keep this semicolon. + +#endif // THREAD_SANITIZER diff --git a/tools/valgrind/tsan_v2/suppressions.txt b/tools/valgrind/tsan_v2/suppressions.txt index 8c22471..45950d3 100644 --- a/tools/valgrind/tsan_v2/suppressions.txt +++ b/tools/valgrind/tsan_v2/suppressions.txt @@ -1,277 +1,2 @@ -# 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 -race:libglib*.so - -# Intentional race in ToolsSanityTest.DataRace in base_unittests. -race:base/tools_sanity_unittest.cc - -# Data race on WatchdogCounter [test-only] -race:base/threading/watchdog_unittest.cc - -# Races in libevent, http://crbug.com/23244 -race:libevent/event.c - -# http://crbug.com/46840 -race:base::HistogramSamples::IncreaseSum -race:base::Histogram::Add -race:base::HistogramSamples::Add - -# http://crbug.com/84094 -race:sqlite3StatusSet -race:pcache1EnforceMaxPage -race:pcache1AllocPage - -# http://crbug.com/102327. -# Test-only race, won't fix. -race:tracked_objects::ThreadData::ShutdownSingleThreadedCleanup - -# http://crbug.com/115540 -race:*GetCurrentThreadIdentifier - -# http://crbug.com/120808 -race:base/threading/watchdog.cc - -# http://crbug.com/157586 -race:third_party/libvpx/source/libvpx/vp8/decoder/threading.c - -# http://crbug.com/158718 -race:third_party/ffmpeg/libavcodec/pthread.c -race:third_party/ffmpeg/libavcodec/pthread_frame.c -race:third_party/ffmpeg/libavcodec/vp8.c -race:third_party/ffmpeg/libavutil/mem.c -race:*HashFrameForTesting -race:third_party/ffmpeg/libavcodec/h264pred.c -race:media::ReleaseData - -# http://crbug.com/158922 -race:third_party/libvpx/source/libvpx/vp8/encoder/* - -# http://crbug.com/189177 -race:thread_manager -race:v8::Locker::Initialize - -# http://crbug.com/223352 -race:uprv_malloc_46 -race:uprv_realloc_46 - -# http://crbug.com/239359 -race:media::TestInputCallback::OnData - -# http://crbug.com/244368 -race:skia::BeginPlatformPaint - -# http://crbug.com/244385 -race:unixTempFileDir - -# http://crbug.com/244755 -race:v8::internal::Zone::NewExpand -race:TooLateToEnableNow -race:adjust_segment_bytes_allocated - -# http://crbug.com/244774 -race:webrtc::RTPReceiver::ProcessBitrate -race:webrtc::RTPSender::ProcessBitrate -race:webrtc::VideoCodingModuleImpl::Decode -race:webrtc::RTPSender::SendOutgoingData -race:webrtc::VP8EncoderImpl::GetEncodedPartitions -race:webrtc::VP8EncoderImpl::Encode -race:webrtc::ViEEncoder::DeliverFrame -race:webrtc::vcm::VideoReceiver::Decode -race:webrtc::VCMReceiver::FrameForDecoding -race:*trace_event_unique_catstatic* - -# http://crbug.com/244856 -race:AutoPulseLock - -# http://crbug.com/246968 -race:webrtc::VideoCodingModuleImpl::RegisterPacketRequestCallback - -# http://crbug.com/246970 -race:webrtc::EventPosix::StartTimer - -# http://crbug.com/246974 -race:content::GpuWatchdogThread::CheckArmed - -# http://crbug.com/257396 -race:base::debug::TraceEventTestFixture_TraceSamplingScope_Test::TestBody - -# http://crbug.com/258479 -race:SamplingStateScope -race:g_trace_state - -# http://crbug.com/258499 -race:third_party/skia/include/core/SkRefCnt.h - -# http://crbug.com/268924 -race:base::g_power_monitor -race:base::PowerMonitor::PowerMonitor -race:base::PowerMonitor::AddObserver - -# http://crbug.com/268941 -race:tracked_objects::ThreadData::tls_index_ - -# http://crbug.com/270037 -race:gLibCleanupFunctions - -# http://crbug.com/272095 -race:base::g_top_manager - -# http://crbug.com/272987 -race:webrtc::MediaStreamTrack<webrtc::AudioTrackInterface>::set_enabled - -# http://crbug.com/273047 -race:base::*::g_lazy_tls_ptr -race:IPC::SyncChannel::ReceivedSyncMsgQueue::lazy_tls_ptr_ - -# http://crbug.com/280466 -race:content::WebRtcAudioCapturer::SetCapturerSource - -# http://crbug.com/285242 -race:media::PulseAudioOutputStream::SetVolume - -# http://crbug.com/290964 -race:PostponeInterruptsScope -race:v8::internal::StackGuard::RequestInstallCode - -# http://crbug.com/296883 -race:net::URLFetcherCore::Stop - -# http://crbug.com/308590 -race:CustomThreadWatcher::~CustomThreadWatcher - -# http://crbug.com/310851 -race:net::ProxyResolverV8Tracing::Job::~Job - -# http://crbug.com/313726 -race:CallbackWasCalled - -# http://crbug.com/327330 -race:PrepareTextureMailbox -race:cc::LayerTreeHost::PaintLayerContents - -# http://crbug.com/328804 -race:v8::internal::Heap::SetStackLimits -race:ScavengePointer - -# http://crbug.com/328826 -race:gLCDOrder -race:gLCDOrientation - -# http://crbug.com/328868 -race:PR_Lock - -# http://crbug.com/329225 -race:blink::currentTimeFunction - -# http://crbug.com/329460 -race:extensions::InfoMap::AddExtension - -# http://crbug.com/330528 -race:v8::internal::MarkCompactCollector::SweepInParallel - -# http://crbug.com/333244 -race:content::VideoCaptureImplTest::MockVideoCaptureImpl::~MockVideoCaptureImpl - -# http://crbug.com/333871 -race:v8::internal::Interface::NewValue()::value_interface -race:v8::internal::IsMinusZero(double)::minus_zero -race:v8::internal::FastCloneShallowObjectStub::InitializeInterfaceDescriptor -race:v8::internal::KeyedLoadStubCompiler::registers -race:v8::internal::KeyedStoreStubCompiler::registers()::registers -race:v8::internal::KeyedLoadFastElementStub::InitializeInterfaceDescriptor -race:v8::internal::KeyedStoreFastElementStub::InitializeInterfaceDescriptor -race:v8::internal::LoadStubCompiler::registers -race:v8::internal::StoreStubCompiler::registers -race:v8::internal::HValue::LoopWeight - -# http://crbug.com/334140 -race:CommandLine::HasSwitch -race:CommandLine::current_process_commandline_ -race:CommandLine::GetSwitchValueASCII - -# http://crbug.com/338675 -race:blink::s_platform -race:content::RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl - -# http://crbug.com/345240 -race:WTF::s_shutdown - -# http://crbug.com/345245 -race:jingle_glue::JingleThreadWrapper::~JingleThreadWrapper -race:webrtc::voe::Channel::UpdatePacketDelay -race:webrtc::voe::Channel::GetDelayEstimate -race:webrtc::VCMCodecDataBase::DeregisterReceiveCodec -race:webrtc::GainControlImpl::set_stream_analog_level - -# http://crbug.com/345251 -race:cc::s_next_layer_id - -# http://crbug.com/345618 -race:WebCore::AudioDestinationNode::render - -# http://crbug.com/345624 -race:media::DataSource::set_host - -# http://crbug.com/347534 -race:v8::internal::V8::TearDown - -# http://crbug.com/347538 -race:sctp_timer_start - -# http://crbug.com/347548 -race:cricket::WebRtcVideoMediaChannel::MaybeResetVieSendCodec -race:cricket::WebRtcVideoMediaChannel::SetSendCodec - -# http://crbug.com/347553 -race:blink::WebString::reset - -# http://crbug.com/348511 -race:webrtc::acm1::AudioCodingModuleImpl::PlayoutData10Ms - -# http://crbug.com/348982 -race:cricket::P2PTransportChannel::OnConnectionDestroyed -race:cricket::P2PTransportChannel::AddConnection - -# http://crbug.com/348984 -race:sctp_express_handle_sack - -# http://crbug.com/350982 -race:libvpx/vp9/decoder/vp9_thread.c - -# http://crbug.com/361790 -race:workerGlobalScopeDestroyed - -# http://crbug.com/363999 -race:v8::internal::EnterDebugger::*EnterDebugger - -# http://crbug.com/364006 -race:gfx::ImageFamily::~ImageFamily - -# http://crbug.com/364014 -race:WTF::Latin1Encoding()::globalLatin1Encoding - -# https://code.google.com/p/v8/issues/detail?id=3143 -race:v8::internal::FLAG_track_double_fields - -# https://crbug.com/369257 -# TODO(mtklein): annotate properly and remove suppressions. -race:SandboxIPCHandler::HandleFontMatchRequest -race:SkFontConfigInterfaceDirect::matchFamilyName -race:SkFontConfigInterface::GetSingletonDirectInterface - -# http://crbug.com/372807 -deadlock:net::X509Certificate::CreateCertificateListFromBytes -deadlock:net::X509Certificate::CreateFromBytes -deadlock:net::SSLClientSocketNSS::Core::DoHandshakeLoop - -# http://crbug.com/374135 -race:media::AlsaWrapper::PcmWritei -deadlock:media::AudioOutputDispatcherImpl::StopStream -deadlock:media::AudioStreamHandler::AudioStreamContainer::OnMoreData - -# http://crbug.com/374151 -deadlock:media::FakeAudioConsumer::Worker::DoRead - -# http://crbug.com/377420 -deadlock:media::AudioRendererMixerInput::Play +# This file is deprecated; please add new suppressions to +# base/debug/tsan_suppressions.cc. |