1*8975f5c5SAndroid Build Coastguard Worker // Copyright 2015 The Chromium Authors 2*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file. 4*8975f5c5SAndroid Build Coastguard Worker 5*8975f5c5SAndroid Build Coastguard Worker // This file contains the default suppressions for LeakSanitizer. 6*8975f5c5SAndroid Build Coastguard Worker // You can also pass additional suppressions via LSAN_OPTIONS: 7*8975f5c5SAndroid Build Coastguard Worker // LSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to 8*8975f5c5SAndroid Build Coastguard Worker // http://dev.chromium.org/developers/testing/leaksanitizer for more info. 9*8975f5c5SAndroid Build Coastguard Worker 10*8975f5c5SAndroid Build Coastguard Worker #include "build/build_config.h" 11*8975f5c5SAndroid Build Coastguard Worker 12*8975f5c5SAndroid Build Coastguard Worker #if defined(LEAK_SANITIZER) 13*8975f5c5SAndroid Build Coastguard Worker 14*8975f5c5SAndroid Build Coastguard Worker // Please make sure the code below declares a single string variable 15*8975f5c5SAndroid Build Coastguard Worker // kLSanDefaultSuppressions which contains LSan suppressions delimited by 16*8975f5c5SAndroid Build Coastguard Worker // newlines. See http://dev.chromium.org/developers/testing/leaksanitizer 17*8975f5c5SAndroid Build Coastguard Worker // for the instructions on writing suppressions. 18*8975f5c5SAndroid Build Coastguard Worker char kLSanDefaultSuppressions[] = 19*8975f5c5SAndroid Build Coastguard Worker // Intentional leak used as sanity test for Valgrind/memcheck. 20*8975f5c5SAndroid Build Coastguard Worker "leak:base::ToolsSanityTest_MemoryLeak_Test::TestBody\n" 21*8975f5c5SAndroid Build Coastguard Worker 22*8975f5c5SAndroid Build Coastguard Worker // ================ Leaks in third-party code ================ 23*8975f5c5SAndroid Build Coastguard Worker 24*8975f5c5SAndroid Build Coastguard Worker // False positives in libfontconfig. http://crbug.com/39050 25*8975f5c5SAndroid Build Coastguard Worker "leak:libfontconfig\n" 26*8975f5c5SAndroid Build Coastguard Worker "leak:libthird_party_fontconfig\n" 27*8975f5c5SAndroid Build Coastguard Worker // eglibc-2.19/string/strdup.c creates false positive leak errors because of 28*8975f5c5SAndroid Build Coastguard Worker // the same reason as crbug.com/39050. The leak error stack trace, when 29*8975f5c5SAndroid Build Coastguard Worker // unwind on malloc, includes a call to libfontconfig. But the default stack 30*8975f5c5SAndroid Build Coastguard Worker // trace is too short in leak sanitizer bot to make the libfontconfig 31*8975f5c5SAndroid Build Coastguard Worker // suppression works. http://crbug.com/605286 32*8975f5c5SAndroid Build Coastguard Worker "leak:__strdup\n" 33*8975f5c5SAndroid Build Coastguard Worker 34*8975f5c5SAndroid Build Coastguard Worker // Leaks in GL and Vulkan drivers and system libraries on Linux NVIDIA 35*8975f5c5SAndroid Build Coastguard Worker "leak:libGL.so\n" 36*8975f5c5SAndroid Build Coastguard Worker "leak:libGLX_nvidia.so\n" 37*8975f5c5SAndroid Build Coastguard Worker "leak:libnvidia-cbl.so\n" 38*8975f5c5SAndroid Build Coastguard Worker "leak:libnvidia-fatbinaryloader.so\n" 39*8975f5c5SAndroid Build Coastguard Worker "leak:libnvidia-glcore.so\n" 40*8975f5c5SAndroid Build Coastguard Worker "leak:libnvidia-rtcore.so\n" 41*8975f5c5SAndroid Build Coastguard Worker "leak:nvidia0\n" 42*8975f5c5SAndroid Build Coastguard Worker "leak:nvidiactl\n" 43*8975f5c5SAndroid Build Coastguard Worker "leak:libdbus-1.so\n" 44*8975f5c5SAndroid Build Coastguard Worker 45*8975f5c5SAndroid Build Coastguard Worker // XRandR has several one time leaks. 46*8975f5c5SAndroid Build Coastguard Worker "leak:libxrandr\n" 47*8975f5c5SAndroid Build Coastguard Worker 48*8975f5c5SAndroid Build Coastguard Worker // xrandr leak. http://crbug.com/119677 49*8975f5c5SAndroid Build Coastguard Worker "leak:XRRFindDisplay\n" 50*8975f5c5SAndroid Build Coastguard Worker 51*8975f5c5SAndroid Build Coastguard Worker // http://crbug.com/431213, http://crbug.com/416665 52*8975f5c5SAndroid Build Coastguard Worker "leak:gin/object_template_builder.h\n" 53*8975f5c5SAndroid Build Coastguard Worker "leak:gin/function_template.h\n" 54*8975f5c5SAndroid Build Coastguard Worker 55*8975f5c5SAndroid Build Coastguard Worker // Leaks in swrast_dri.so. http://crbug.com/540042 56*8975f5c5SAndroid Build Coastguard Worker "leak:swrast_dri.so\n" 57*8975f5c5SAndroid Build Coastguard Worker 58*8975f5c5SAndroid Build Coastguard Worker // Leak in glibc's gconv caused by fopen(..., "r,ccs=UNICODE") 59*8975f5c5SAndroid Build Coastguard Worker "leak:__gconv_lookup_cache\n" 60*8975f5c5SAndroid Build Coastguard Worker 61*8975f5c5SAndroid Build Coastguard Worker // Leak in libnssutil. crbug.com/1290634 62*8975f5c5SAndroid Build Coastguard Worker "leak:libnssutil3\n" 63*8975f5c5SAndroid Build Coastguard Worker 64*8975f5c5SAndroid Build Coastguard Worker // Suppress leaks from unknown third party modules. http://anglebug.com/6937 65*8975f5c5SAndroid Build Coastguard Worker "leak:<unknown module>\n" 66*8975f5c5SAndroid Build Coastguard Worker 67*8975f5c5SAndroid Build Coastguard Worker // Suppress leaks from temporary files. http://crbug.com/1433299 68*8975f5c5SAndroid Build Coastguard Worker "leak:(deleted)\n" 69*8975f5c5SAndroid Build Coastguard Worker 70*8975f5c5SAndroid Build Coastguard Worker // ================ Leaks in Chromium code ================ 71*8975f5c5SAndroid Build Coastguard Worker // PLEASE DO NOT ADD SUPPRESSIONS FOR NEW LEAKS. 72*8975f5c5SAndroid Build Coastguard Worker // Instead, commits that introduce memory leaks should be reverted. 73*8975f5c5SAndroid Build Coastguard Worker // Suppressing the leak is acceptable in some cases when reverting is 74*8975f5c5SAndroid Build Coastguard Worker // impossible, i.e. when enabling leak detection for the first time for a 75*8975f5c5SAndroid Build Coastguard Worker // test target with pre-existing leaks. 76*8975f5c5SAndroid Build Coastguard Worker 77*8975f5c5SAndroid Build Coastguard Worker // v8 leaks caused by weak ref not call 78*8975f5c5SAndroid Build Coastguard Worker "leak:blink::DOMWrapperWorld::Create\n" 79*8975f5c5SAndroid Build Coastguard Worker "leak:blink::ScriptState::Create\n" 80*8975f5c5SAndroid Build Coastguard Worker 81*8975f5c5SAndroid Build Coastguard Worker // Crash keys are intentionally leaked. 82*8975f5c5SAndroid Build Coastguard Worker "leak:crash_reporter::(anonymous " 83*8975f5c5SAndroid Build Coastguard Worker "namespace)::CrashKeyBaseSupport::Allocate\n" 84*8975f5c5SAndroid Build Coastguard Worker 85*8975f5c5SAndroid Build Coastguard Worker // Suppress leaks in CreateCdmInstance. https://crbug.com/961062 86*8975f5c5SAndroid Build Coastguard Worker "leak:media::CdmAdapter::CreateCdmInstance\n" 87*8975f5c5SAndroid Build Coastguard Worker 88*8975f5c5SAndroid Build Coastguard Worker #if BUILDFLAG(IS_CHROMEOS) 89*8975f5c5SAndroid Build Coastguard Worker // Suppress leak in FileStream. crbug.com/1263374 90*8975f5c5SAndroid Build Coastguard Worker "leak:chromeos::PipeReader::StartIO\n" 91*8975f5c5SAndroid Build Coastguard Worker // Supppress AnimationObserverToHideView leak. crbug.com/1261464 92*8975f5c5SAndroid Build Coastguard Worker "leak:ash::ShelfNavigationWidget::UpdateButtonVisibility\n" 93*8975f5c5SAndroid Build Coastguard Worker // Suppress AnimationSequence leak. crbug.com/1265031 94*8975f5c5SAndroid Build Coastguard Worker "leak:ash::LockStateController::StartPostLockAnimation\n" 95*8975f5c5SAndroid Build Coastguard Worker // Suppress leak in SurfaceDrawContext. crbug.com/1265033 96*8975f5c5SAndroid Build Coastguard Worker "leak:skgpu::v1::SurfaceDrawContext::drawGlyphRunList\n" 97*8975f5c5SAndroid Build Coastguard Worker // Suppress leak in BluetoothServerSocket. crbug.com/1278970 98*8975f5c5SAndroid Build Coastguard Worker "leak:nearby::chrome::BluetoothServerSocket::" 99*8975f5c5SAndroid Build Coastguard Worker "BluetoothServerSocket\n" 100*8975f5c5SAndroid Build Coastguard Worker // Suppress leak in NearbyConnectionBrokerImpl. crbug.com/1279578 101*8975f5c5SAndroid Build Coastguard Worker "leak:ash::secure_channel::NearbyConnectionBrokerImpl\n" 102*8975f5c5SAndroid Build Coastguard Worker // Suppress leak in NearbyEndpointFinderImpl. crbug.com/1288577 103*8975f5c5SAndroid Build Coastguard Worker "leak:ash::secure_channel::NearbyEndpointFinderImpl::~" 104*8975f5c5SAndroid Build Coastguard Worker "NearbyEndpointFinderImpl\n" 105*8975f5c5SAndroid Build Coastguard Worker // Suppress leak in DelayedCallbackGroup test. crbug.com/1279563 106*8975f5c5SAndroid Build Coastguard Worker "leak:DelayedCallbackGroup_TimeoutAndRun_Test\n" 107*8975f5c5SAndroid Build Coastguard Worker #endif 108*8975f5c5SAndroid Build Coastguard Worker #if BUILDFLAG(IS_MAC) 109*8975f5c5SAndroid Build Coastguard Worker // These are caused by the system, but not yet clear if they are false 110*8975f5c5SAndroid Build Coastguard Worker // positives or bugs in the Mac LSAN runtime. Suppress while investigating. 111*8975f5c5SAndroid Build Coastguard Worker // TODO(crbug.com/40223516): Remove these if/when fixed in macOS 112*8975f5c5SAndroid Build Coastguard Worker // or the runtime. 113*8975f5c5SAndroid Build Coastguard Worker "leak:_ensureAuxServiceAwareOfHostApp\n" 114*8975f5c5SAndroid Build Coastguard Worker "leak:cssmErrorString\n" 115*8975f5c5SAndroid Build Coastguard Worker #endif 116*8975f5c5SAndroid Build Coastguard Worker 117*8975f5c5SAndroid Build Coastguard Worker // PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS. 118*8975f5c5SAndroid Build Coastguard Worker 119*8975f5c5SAndroid Build Coastguard Worker // End of suppressions. 120*8975f5c5SAndroid Build Coastguard Worker ; // Please keep this semicolon. 121*8975f5c5SAndroid Build Coastguard Worker 122*8975f5c5SAndroid Build Coastguard Worker #endif // LEAK_SANITIZER 123