From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../libwebrtc/tools_webrtc/sanitizers/README | 3 + .../sanitizers/lsan_suppressions_webrtc.cc | 100 +++++++++++++++++++++ .../sanitizers/tsan_suppressions_webrtc.cc | 62 +++++++++++++ 3 files changed, 165 insertions(+) create mode 100644 third_party/libwebrtc/tools_webrtc/sanitizers/README create mode 100644 third_party/libwebrtc/tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc create mode 100644 third_party/libwebrtc/tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc (limited to 'third_party/libwebrtc/tools_webrtc/sanitizers') diff --git a/third_party/libwebrtc/tools_webrtc/sanitizers/README b/third_party/libwebrtc/tools_webrtc/sanitizers/README new file mode 100644 index 0000000000..68c3015f49 --- /dev/null +++ b/third_party/libwebrtc/tools_webrtc/sanitizers/README @@ -0,0 +1,3 @@ +This directory contains suppressions for sanitizer tools. +They're overriding the default ones for Chromium using our +webrtc/supplement.gypi file. diff --git a/third_party/libwebrtc/tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc b/third_party/libwebrtc/tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc new file mode 100644 index 0000000000..eb9f6a4761 --- /dev/null +++ b/third_party/libwebrtc/tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains the WebRTC 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[] = + + // ============ Leaks in third-party code shared with Chromium ============= + // These entries are copied from build/sanitizers/lsan_suppressions.cc in + // Chromium. Please don't add new entries here unless they're present in + // there. + + // False positives in libfontconfig. http://crbug.com/39050 + "leak:libfontconfig\n" + + // Leaks in Nvidia's libGL. + "leak:libGL.so\n" + + // XRandR has several one time leaks. + "leak:libxrandr\n" + + // xrandr leak. http://crbug.com/119677 + "leak:XRRFindDisplay\n" + + // ========== Leaks in third-party code not shared with Chromium =========== + + // None known so far. + + // ================ Leaks in WebRTC 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 pre-existing leaks. + + // rtc_unittest + // https://code.google.com/p/webrtc/issues/detail?id=3827 for details. + "leak:rtc::unstarted_task_test_DoNotDeleteTask2_Test::TestBody\n" + "leak:rtc::HttpServer::HandleConnection\n" + "leak:rtc::HttpServer::Connection::onHttpHeaderComplete\n" + "leak:rtc::HttpResponseData::set_success\n" + "leak:rtc::HttpData::changeHeader\n" + // https://code.google.com/p/webrtc/issues/detail?id=4149 for details. + "leak:StartDNSLookup\n" + + // rtc_media_unittests + "leak:cricket::FakeNetworkInterface::SetOption\n" + "leak:CodecTest_TestCodecOperators_Test::TestBody\n" + "leak:VideoEngineTest*::ConstrainNewCodecBody\n" + "leak:VideoMediaChannelTest*::AddRemoveRecvStreams\n" + "leak:WebRtcVideoCapturerTest_TestCapture_Test::TestBody\n" + "leak:WebRtcVideoEngineTestFake_MultipleSendStreamsWithOneCapturer_Test::" + "TestBody\n" + "leak:WebRtcVideoEngineTestFake_SetBandwidthInConference_Test::TestBody\n" + "leak:WebRtcVideoEngineTestFake_SetSendCodecsRejectBadFormat_Test::" + "TestBody\n" + + // peerconnection_unittests + // https://code.google.com/p/webrtc/issues/detail?id=2528 + "leak:cricket::FakeVideoMediaChannel::~FakeVideoMediaChannel\n" + "leak:DtmfSenderTest_InsertEmptyTonesToCancelPreviousTask_Test::TestBody\n" + "leak:sigslot::_signal_base2*::~_signal_base2\n" + "leak:testing::internal::CmpHelperEQ\n" + "leak:webrtc::AudioDeviceLinuxALSA::InitMicrophone\n" + "leak:webrtc::AudioDeviceLinuxALSA::InitSpeaker\n" + "leak:webrtc::CreateIceCandidate\n" + "leak:webrtc::WebRtcIdentityRequestObserver::OnSuccess\n" + "leak:PeerConnectionInterfaceTest_SsrcInOfferAnswer_Test::TestBody\n" + "leak:PeerConnectionInterfaceTest_CloseAndTestMethods_Test::TestBody\n" + "leak:WebRtcSdpTest::TestDeserializeRtcpFb\n" + "leak:WebRtcSdpTest::TestSerialize\n" + "leak:WebRtcSdpTest_SerializeSessionDescriptionWithDataChannelAndBandwidth_" + "Test::TestBody\n" + "leak:WebRtcSdpTest_SerializeSessionDescriptionWithBandwidth_Test::" + "TestBody\n" + "leak:WebRtcSessionTest::SetLocalDescriptionExpectError\n" + "leak:WebRtcSessionTest_TestAVOfferWithAudioOnlyAnswer_Test::TestBody\n" + + // PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS. + + // End of suppressions. + ; // Please keep this semicolon. + +#endif // LEAK_SANITIZER diff --git a/third_party/libwebrtc/tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc b/third_party/libwebrtc/tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc new file mode 100644 index 0000000000..a3a4bdbdd0 --- /dev/null +++ b/third_party/libwebrtc/tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +// This file contains the WebRTC suppressions for ThreadSanitizer. +// 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[] = + + // WebRTC specific suppressions. + + // Split up suppressions covered previously by thread.cc and + // messagequeue.cc. + "race:vp8cx_remove_encoder_threads\n" + "race:third_party/libvpx/source/libvpx/vp9/common/vp9_scan.h\n" + + // rtc_unittests + // https://code.google.com/p/webrtc/issues/detail?id=2080 + "race:rtc_base/logging.cc\n" + + // Potential deadlocks detected after roll in r6516. + // https://code.google.com/p/webrtc/issues/detail?id=3509 + "deadlock:webrtc::test::UdpSocketManagerPosixImpl::RemoveSocket\n" + + // TODO(pbos): Trace events are racy due to lack of proper POD atomics. + // https://code.google.com/p/webrtc/issues/detail?id=2497 + "race:*trace_event_unique_catstatic*\n" + + // Race between InitCpuFlags and TestCpuFlag in libyuv. + // https://code.google.com/p/libyuv/issues/detail?id=508 + "race:InitCpuFlags\n" + + // Test-only race due to PeerConnection::session() being virtual for + // testing. The stats collector may call session() before or after the + // destructor begins executing, which modifies the vtable. + "race:*RTCStatsIntegrationTest_GetsStatsWhileDestroyingPeerConnections_" + "Test::TestBody\n" + + // http://crbug.com/244856 + "race:libpulsecommon*.so\n" + + // https://crbug.com/1158622 + "race:absl::synchronization_internal::Waiter::Post\n" + + // End of suppressions. + ; // Please keep this semicolon. + +#endif // THREAD_SANITIZER -- cgit v1.2.3