lsan_suppressions.cc 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. // This file contains the default suppressions for LeakSanitizer.
  5. // You can also pass additional suppressions via LSAN_OPTIONS:
  6. // LSAN_OPTIONS=suppressions=/path/to/suppressions. Please refer to
  7. // http://dev.chromium.org/developers/testing/leaksanitizer for more info.
  8. #include "build/build_config.h"
  9. #if defined(LEAK_SANITIZER)
  10. // Please make sure the code below declares a single string variable
  11. // kLSanDefaultSuppressions which contains LSan suppressions delimited by
  12. // newlines. See http://dev.chromium.org/developers/testing/leaksanitizer
  13. // for the instructions on writing suppressions.
  14. char kLSanDefaultSuppressions[] =
  15. // Intentional leak used as sanity test for Valgrind/memcheck.
  16. "leak:base::ToolsSanityTest_MemoryLeak_Test::TestBody\n"
  17. // ================ Leaks in third-party code ================
  18. // False positives in libfontconfig. http://crbug.com/39050
  19. "leak:libfontconfig\n"
  20. // eglibc-2.19/string/strdup.c creates false positive leak errors because of
  21. // the same reason as crbug.com/39050. The leak error stack trace, when
  22. // unwind on malloc, includes a call to libfontconfig. But the default stack
  23. // trace is too short in leak sanitizer bot to make the libfontconfig
  24. // suppression works. http://crbug.com/605286
  25. "leak:__strdup\n"
  26. // Leaks in Nvidia's libGL.
  27. "leak:libGL.so\n"
  28. "leak:libGLX_nvidia.so\n"
  29. "leak:libnvidia-glcore.so\n"
  30. // XRandR has several one time leaks.
  31. "leak:libxrandr\n"
  32. // xrandr leak. http://crbug.com/119677
  33. "leak:XRRFindDisplay\n"
  34. // http://crbug.com/431213, http://crbug.com/416665
  35. "leak:gin/object_template_builder.h\n"
  36. "leak:gin/function_template.h\n"
  37. // Leaks in swrast_dri.so. http://crbug.com/540042
  38. "leak:swrast_dri.so\n"
  39. // Leak in glibc's gconv caused by fopen(..., "r,ccs=UNICODE")
  40. "leak:__gconv_lookup_cache\n"
  41. // Leak in libnssutil. crbug.com/1290634
  42. "leak:libnssutil3\n"
  43. // Suppress leaks from unknown third party modules. http://anglebug.com/6937
  44. "leak:<unknown module>\n"
  45. // ================ Leaks in Chromium 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. // https://crbug.com/755670
  52. "leak:third_party/yasm/\n"
  53. // v8 leaks caused by weak ref not call
  54. "leak:blink::DOMWrapperWorld::Create\n"
  55. "leak:blink::ScriptState::Create\n"
  56. // Crash keys are intentionally leaked.
  57. "leak:crash_reporter::(anonymous "
  58. "namespace)::CrashKeyBaseSupport::Allocate\n"
  59. // Suppress leaks in CreateCdmInstance. https://crbug.com/961062
  60. "leak:media::CdmAdapter::CreateCdmInstance\n"
  61. #if BUILDFLAG(IS_CHROMEOS)
  62. // Suppress leak in FileStream. crbug.com/1263374
  63. "leak:chromeos::PipeReader::StartIO\n"
  64. // Supppress AnimationObserverToHideView leak. crbug.com/1261464
  65. "leak:ash::ShelfNavigationWidget::UpdateButtonVisibility\n"
  66. // Suppress AnimationSequence leak. crbug.com/1265031
  67. "leak:ash::LockStateController::StartPostLockAnimation\n"
  68. // Suppress leak in SurfaceDrawContext. crbug.com/1265033
  69. "leak:skgpu::v1::SurfaceDrawContext::drawGlyphRunList\n"
  70. // Suppress leak in BluetoothServerSocket. crbug.com/1278970
  71. "leak:location::nearby::chrome::BluetoothServerSocket::"
  72. "BluetoothServerSocket\n"
  73. // Suppress leak in NearbyConnectionBrokerImpl. crbug.com/1279578
  74. "leak:ash::secure_channel::NearbyConnectionBrokerImpl\n"
  75. // Suppress leak in NearbyEndpointFinderImpl. crbug.com/1288577
  76. "leak:ash::secure_channel::NearbyEndpointFinderImpl::~"
  77. "NearbyEndpointFinderImpl\n"
  78. // Suppress leak in DelayedCallbackGroup test. crbug.com/1279563
  79. "leak:DelayedCallbackGroup_TimeoutAndRun_Test\n"
  80. #endif
  81. // PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS.
  82. // End of suppressions.
  83. ; // Please keep this semicolon.
  84. #endif // LEAK_SANITIZER