15f9996aaSopenharmony_ci// Copyright 2015 The Chromium Authors. All rights reserved. 25f9996aaSopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 35f9996aaSopenharmony_ci// found in the LICENSE file. 45f9996aaSopenharmony_ci 55f9996aaSopenharmony_ci// This file contains the default suppressions for LeakSanitizer. 65f9996aaSopenharmony_ci// You can also pass additional suppressions via LSAN_OPTIONS: 75f9996aaSopenharmony_ci// LSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to 85f9996aaSopenharmony_ci// http://dev.chromium.org/developers/testing/leaksanitizer for more info. 95f9996aaSopenharmony_ci 105f9996aaSopenharmony_ci#if defined(LEAK_SANITIZER) 115f9996aaSopenharmony_ci 125f9996aaSopenharmony_ci// Please make sure the code below declares a single string variable 135f9996aaSopenharmony_ci// kLSanDefaultSuppressions which contains LSan suppressions delimited by 145f9996aaSopenharmony_ci// newlines. See http://dev.chromium.org/developers/testing/leaksanitizer 155f9996aaSopenharmony_ci// for the instructions on writing suppressions. 165f9996aaSopenharmony_cichar kLSanDefaultSuppressions[] = 175f9996aaSopenharmony_ci // Intentional leak used as sanity test for Valgrind/memcheck. 185f9996aaSopenharmony_ci "leak:base::ToolsSanityTest_MemoryLeak_Test::TestBody\n" 195f9996aaSopenharmony_ci 205f9996aaSopenharmony_ci // ================ Leaks in third-party code ================ 215f9996aaSopenharmony_ci 225f9996aaSopenharmony_ci // False positives in libfontconfig. http://crbug.com/39050 235f9996aaSopenharmony_ci "leak:libfontconfig\n" 245f9996aaSopenharmony_ci // eglibc-2.19/string/strdup.c creates false positive leak errors because of 255f9996aaSopenharmony_ci // the same reason as crbug.com/39050. The leak error stack trace, when 265f9996aaSopenharmony_ci // unwind on malloc, includes a call to libfontconfig. But the default stack 275f9996aaSopenharmony_ci // trace is too short in leak sanitizer bot to make the libfontconfig 285f9996aaSopenharmony_ci // suppression works. http://crbug.com/605286 295f9996aaSopenharmony_ci "leak:__strdup\n" 305f9996aaSopenharmony_ci 315f9996aaSopenharmony_ci // Leaks in Nvidia's libGL. 325f9996aaSopenharmony_ci "leak:libGL.so\n" 335f9996aaSopenharmony_ci 345f9996aaSopenharmony_ci "leak:net::NSSCertDatabase::ImportFromPKCS12\n" 355f9996aaSopenharmony_ci "leak:net::NSSCertDatabase::ListCerts\n" 365f9996aaSopenharmony_ci "leak:net::NSSCertDatabase::DeleteCertAndKey\n" 375f9996aaSopenharmony_ci "leak:crypto::ScopedTestNSSDB::ScopedTestNSSDB\n" 385f9996aaSopenharmony_ci // Another leak due to not shutting down NSS properly. 395f9996aaSopenharmony_ci // http://crbug.com/124445 405f9996aaSopenharmony_ci "leak:error_get_my_stack\n" 415f9996aaSopenharmony_ci // The NSS suppressions above will not fire when the fast stack unwinder is 425f9996aaSopenharmony_ci // used, because it can't unwind through NSS libraries. Apply blanket 435f9996aaSopenharmony_ci // suppressions for now. 445f9996aaSopenharmony_ci "leak:libnssutil3\n" 455f9996aaSopenharmony_ci "leak:libnspr4\n" 465f9996aaSopenharmony_ci "leak:libnss3\n" 475f9996aaSopenharmony_ci "leak:libplds4\n" 485f9996aaSopenharmony_ci "leak:libnssckbi\n" 495f9996aaSopenharmony_ci 505f9996aaSopenharmony_ci // XRandR has several one time leaks. 515f9996aaSopenharmony_ci "leak:libxrandr\n" 525f9996aaSopenharmony_ci 535f9996aaSopenharmony_ci // xrandr leak. http://crbug.com/119677 545f9996aaSopenharmony_ci "leak:XRRFindDisplay\n" 555f9996aaSopenharmony_ci 565f9996aaSopenharmony_ci // http://crbug.com/431213, http://crbug.com/416665 575f9996aaSopenharmony_ci "leak:gin/object_template_builder.h\n" 585f9996aaSopenharmony_ci 595f9996aaSopenharmony_ci // Leaks in swrast_dri.so. http://crbug.com/540042 605f9996aaSopenharmony_ci "leak:swrast_dri.so\n" 615f9996aaSopenharmony_ci 625f9996aaSopenharmony_ci // Leak in glibc's gconv caused by fopen(..., "r,ccs=UNICODE") 635f9996aaSopenharmony_ci "leak:__gconv_lookup_cache\n" 645f9996aaSopenharmony_ci 655f9996aaSopenharmony_ci // ================ Leaks in Chromium code ================ 665f9996aaSopenharmony_ci // PLEASE DO NOT ADD SUPPRESSIONS FOR NEW LEAKS. 675f9996aaSopenharmony_ci // Instead, commits that introduce memory leaks should be reverted. 685f9996aaSopenharmony_ci // Suppressing the leak is acceptable in some cases when reverting is 695f9996aaSopenharmony_ci // impossible, i.e. when enabling leak detection for the first time for a 705f9996aaSopenharmony_ci // test target with pre-existing leaks. 715f9996aaSopenharmony_ci 725f9996aaSopenharmony_ci // Small test-only leak in ppapi_unittests. http://crbug.com/258113 735f9996aaSopenharmony_ci "leak:ppapi::proxy::PPP_Instance_Private_ProxyTest_PPPInstancePrivate_" 745f9996aaSopenharmony_ci "Test\n" 755f9996aaSopenharmony_ci 765f9996aaSopenharmony_ci // http://crbug.com/322671 775f9996aaSopenharmony_ci "leak:content::SpeechRecognitionBrowserTest::SetUpOnMainThread\n" 785f9996aaSopenharmony_ci 795f9996aaSopenharmony_ci // http://crbug.com/355641 805f9996aaSopenharmony_ci "leak:TrayAccessibilityTest\n" 815f9996aaSopenharmony_ci 825f9996aaSopenharmony_ci // http://crbug.com/354644 835f9996aaSopenharmony_ci "leak:CertificateViewerUITest::ShowModalCertificateViewer\n" 845f9996aaSopenharmony_ci 855f9996aaSopenharmony_ci // http://crbug.com/356306 865f9996aaSopenharmony_ci "leak:service_manager::SetProcessTitleFromCommandLine\n" 875f9996aaSopenharmony_ci 885f9996aaSopenharmony_ci // https://crbug.com/755670 895f9996aaSopenharmony_ci "leak:third_party/yasm/\n" 905f9996aaSopenharmony_ci 915f9996aaSopenharmony_ci // v8 leaks caused by weak ref not call 925f9996aaSopenharmony_ci "leak:blink::DOMWrapperWorld::Create\n" 935f9996aaSopenharmony_ci "leak:blink::ScriptState::Create\n" 945f9996aaSopenharmony_ci 955f9996aaSopenharmony_ci // https://crbug.com/795148 965f9996aaSopenharmony_ci "leak:third_party/fontconfig/\n" 975f9996aaSopenharmony_ci 985f9996aaSopenharmony_ci // PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS. 995f9996aaSopenharmony_ci 1005f9996aaSopenharmony_ci // End of suppressions. 1015f9996aaSopenharmony_ci ; // Please keep this semicolon. 1025f9996aaSopenharmony_ci 1035f9996aaSopenharmony_ci#endif // LEAK_SANITIZER 104