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