1 /*
2  *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 // This file contains the WebRTC suppressions for LeakSanitizer.
12 // You can also pass additional suppressions via LSAN_OPTIONS:
13 // LSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to
14 // http://dev.chromium.org/developers/testing/leaksanitizer for more info.
15 
16 #if defined(LEAK_SANITIZER)
17 
18 // Please make sure the code below declares a single string variable
19 // kLSanDefaultSuppressions which contains LSan suppressions delimited by
20 // newlines. See http://dev.chromium.org/developers/testing/leaksanitizer
21 // for the instructions on writing suppressions.
22 char kLSanDefaultSuppressions[] =
23 
24     // ============ Leaks in third-party code shared with Chromium =============
25     // These entries are copied from build/sanitizers/lsan_suppressions.cc in
26     // Chromium. Please don't add new entries here unless they're present in
27     // there.
28 
29     // False positives in libfontconfig. http://crbug.com/39050
30     "leak:libfontconfig\n"
31 
32     // Leaks in Nvidia's libGL.
33     "leak:libGL.so\n"
34 
35     // XRandR has several one time leaks.
36     "leak:libxrandr\n"
37 
38     // xrandr leak. http://crbug.com/119677
39     "leak:XRRFindDisplay\n"
40 
41     // ========== Leaks in third-party code not shared with Chromium ===========
42 
43     // None known so far.
44 
45     // ================ Leaks in WebRTC code ================
46     // PLEASE DO NOT ADD SUPPRESSIONS FOR NEW LEAKS.
47     // Instead, commits that introduce memory leaks should be reverted.
48     // Suppressing the leak is acceptable in some cases when reverting is
49     // impossible, i.e. when enabling leak detection for the first time for a
50     // test target with pre-existing leaks.
51 
52     // rtc_unittest
53     // https://code.google.com/p/webrtc/issues/detail?id=3827 for details.
54     "leak:rtc::unstarted_task_test_DoNotDeleteTask2_Test::TestBody\n"
55     "leak:rtc::HttpServer::HandleConnection\n"
56     "leak:rtc::HttpServer::Connection::onHttpHeaderComplete\n"
57     "leak:rtc::HttpResponseData::set_success\n"
58     "leak:rtc::HttpData::changeHeader\n"
59     // https://code.google.com/p/webrtc/issues/detail?id=4149 for details.
60     "leak:StartDNSLookup\n"
61 
62     // rtc_media_unittests
63     "leak:cricket::FakeNetworkInterface::SetOption\n"
64     "leak:CodecTest_TestCodecOperators_Test::TestBody\n"
65     "leak:VideoEngineTest*::ConstrainNewCodecBody\n"
66     "leak:VideoMediaChannelTest*::AddRemoveRecvStreams\n"
67     "leak:WebRtcVideoCapturerTest_TestCapture_Test::TestBody\n"
68     "leak:WebRtcVideoEngineTestFake_MultipleSendStreamsWithOneCapturer_Test::"
69     "TestBody\n"
70     "leak:WebRtcVideoEngineTestFake_SetBandwidthInConference_Test::TestBody\n"
71     "leak:WebRtcVideoEngineTestFake_SetSendCodecsRejectBadFormat_Test::"
72     "TestBody\n"
73 
74     // peerconnection_unittests
75     // https://code.google.com/p/webrtc/issues/detail?id=2528
76     "leak:cricket::FakeVideoMediaChannel::~FakeVideoMediaChannel\n"
77     "leak:cricket::MediaSessionDescriptionFactory::CreateAnswer\n"
78     "leak:cricket::MediaSessionDescriptionFactory::CreateOffer\n"
79     "leak:DtmfSenderTest_InsertEmptyTonesToCancelPreviousTask_Test::TestBody\n"
80     "leak:sigslot::_signal_base2*::~_signal_base2\n"
81     "leak:testing::internal::CmpHelperEQ\n"
82     "leak:webrtc::AudioDeviceLinuxALSA::InitMicrophone\n"
83     "leak:webrtc::AudioDeviceLinuxALSA::InitSpeaker\n"
84     "leak:webrtc::CreateIceCandidate\n"
85     "leak:webrtc::WebRtcIdentityRequestObserver::OnSuccess\n"
86     "leak:webrtc::WebRtcSessionDescriptionFactory::InternalCreateAnswer\n"
87     "leak:webrtc::WebRtcSessionDescriptionFactory::InternalCreateOffer\n"
88     "leak:PeerConnectionInterfaceTest_SsrcInOfferAnswer_Test::TestBody\n"
89     "leak:PeerConnectionInterfaceTest_CloseAndTestMethods_Test::TestBody\n"
90     "leak:WebRtcSdpTest::TestDeserializeRtcpFb\n"
91     "leak:WebRtcSdpTest::TestSerialize\n"
92     "leak:WebRtcSdpTest_SerializeSessionDescriptionWithDataChannelAndBandwidth_"
93     "Test::TestBody\n"
94     "leak:WebRtcSdpTest_SerializeSessionDescriptionWithBandwidth_Test::"
95     "TestBody\n"
96     "leak:WebRtcSessionTest::SetLocalDescriptionExpectError\n"
97     "leak:WebRtcSessionTest_TestAVOfferWithAudioOnlyAnswer_Test::TestBody\n"
98 
99     // PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS.
100 
101     // End of suppressions.
102     ;  // Please keep this semicolon.
103 
104 #endif  // LEAK_SANITIZER
105