• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // This file contains the default suppressions for LeakSanitizer.
6 // You can also pass additional suppressions via LSAN_OPTIONS:
7 // LSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to
8 // http://dev.chromium.org/developers/testing/leaksanitizer for more info.
9 
10 #if defined(LEAK_SANITIZER)
11 
12 // Please make sure the code below declares a single string variable
13 // kLSanDefaultSuppressions which contains LSan suppressions delimited by
14 // newlines. See http://dev.chromium.org/developers/testing/leaksanitizer
15 // for the instructions on writing suppressions.
16 char kLSanDefaultSuppressions[] =
17     // Intentional leak used as sanity test for Valgrind/memcheck.
18     "leak:base::ToolsSanityTest_MemoryLeak_Test::TestBody\n"
19 
20     // ================ Leaks in third-party code ================
21 
22     // False positives in libfontconfig. http://crbug.com/39050
23     "leak:libfontconfig\n"
24     // eglibc-2.19/string/strdup.c creates false positive leak errors because of
25     // the same reason as crbug.com/39050. The leak error stack trace, when
26     // unwind on malloc, includes a call to libfontconfig. But the default stack
27     // trace is too short in leak sanitizer bot to make the libfontconfig
28     // suppression works. http://crbug.com/605286
29     "leak:__strdup\n"
30 
31     // Leaks in Nvidia's libGL.
32     "leak:libGL.so\n"
33 
34     "leak:net::NSSCertDatabase::ImportFromPKCS12\n"
35     "leak:net::NSSCertDatabase::ListCerts\n"
36     "leak:net::NSSCertDatabase::DeleteCertAndKey\n"
37     "leak:crypto::ScopedTestNSSDB::ScopedTestNSSDB\n"
38     // Another leak due to not shutting down NSS properly.
39     // http://crbug.com/124445
40     "leak:error_get_my_stack\n"
41     // The NSS suppressions above will not fire when the fast stack unwinder is
42     // used, because it can't unwind through NSS libraries. Apply blanket
43     // suppressions for now.
44     "leak:libnssutil3\n"
45     "leak:libnspr4\n"
46     "leak:libnss3\n"
47     "leak:libplds4\n"
48     "leak:libnssckbi\n"
49 
50     // XRandR has several one time leaks.
51     "leak:libxrandr\n"
52 
53     // xrandr leak. http://crbug.com/119677
54     "leak:XRRFindDisplay\n"
55 
56     // http://crbug.com/431213, http://crbug.com/416665
57     "leak:gin/object_template_builder.h\n"
58 
59     // Leaks in swrast_dri.so. http://crbug.com/540042
60     "leak:swrast_dri.so\n"
61 
62     // Leak in glibc's gconv caused by fopen(..., "r,ccs=UNICODE")
63     "leak:__gconv_lookup_cache\n"
64 
65     // ================ Leaks in Chromium code ================
66     // PLEASE DO NOT ADD SUPPRESSIONS FOR NEW LEAKS.
67     // Instead, commits that introduce memory leaks should be reverted.
68     // Suppressing the leak is acceptable in some cases when reverting is
69     // impossible, i.e. when enabling leak detection for the first time for a
70     // test target with pre-existing leaks.
71 
72     // Small test-only leak in ppapi_unittests. http://crbug.com/258113
73     "leak:ppapi::proxy::PPP_Instance_Private_ProxyTest_PPPInstancePrivate_"
74     "Test\n"
75 
76     // http://crbug.com/322671
77     "leak:content::SpeechRecognitionBrowserTest::SetUpOnMainThread\n"
78 
79     // http://crbug.com/355641
80     "leak:TrayAccessibilityTest\n"
81 
82     // http://crbug.com/354644
83     "leak:CertificateViewerUITest::ShowModalCertificateViewer\n"
84 
85     // http://crbug.com/356306
86     "leak:service_manager::SetProcessTitleFromCommandLine\n"
87 
88     // https://crbug.com/755670
89     "leak:third_party/yasm/\n"
90 
91     // v8 leaks caused by weak ref not call
92     "leak:blink::DOMWrapperWorld::Create\n"
93     "leak:blink::ScriptState::Create\n"
94 
95     // https://crbug.com/795148
96     "leak:third_party/fontconfig/\n"
97 
98     // PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS.
99 
100     // End of suppressions.
101     ;  // Please keep this semicolon.
102 
103 #endif  // LEAK_SANITIZER
104