Chromium Code Reviews| Index: build/sanitizers/sanitizer_options.cc |
| diff --git a/build/sanitizers/sanitizer_options.cc b/build/sanitizers/sanitizer_options.cc |
| index af78bf855806434a5952861cf81316590be7ce51..b4d17cb35b8d17c4ea64ea42a1b7b1375035015c 100644 |
| --- a/build/sanitizers/sanitizer_options.cc |
| +++ b/build/sanitizers/sanitizer_options.cc |
| @@ -143,3 +143,35 @@ const char *__tsan_default_suppressions() { |
| } |
| #endif // THREAD_SANITIZER && OS_LINUX |
| + |
| +#if defined(LEAK_SANITIZER) |
| +// Default options for LeakSanitizer: |
| +// print_suppressions=1 - print the list of matched suppressions. |
| +// strip_path_prefix=Release/../../ - prefixes up to and including this |
| +// substring will be stripped from source file paths in symbolized reports. |
| +const char kLsanDefaultOptions[] = |
| + "print_suppressions=1 strip_path_prefix=Release/../../ "; |
| + |
| +extern "C" |
| +__attribute__((no_sanitize_thread)) |
|
Alexander Potapenko
2015/02/16 10:29:11
Did you mean __attribute__((no_sanitize_address))
earthdok
2015/02/16 13:39:59
I've refactored this file a bit, ptal.
|
| +__attribute__((visibility("default"))) |
| +// The function isn't referenced from the executable itself. Make sure it isn't |
| +// stripped by the linker. |
| +__attribute__((used)) |
| +const char *__lsan_default_options() { |
| + return kLsanDefaultOptions; |
| +} |
| + |
| +extern "C" char kLSanDefaultSuppressions[]; |
| + |
| +extern "C" |
| +__attribute__((no_sanitize_thread)) |
| +__attribute__((visibility("default"))) |
| +// The function isn't referenced from the executable itself. Make sure it isn't |
| +// stripped by the linker. |
| +__attribute__((used)) |
| +const char *__lsan_default_suppressions() { |
| + return kLSanDefaultSuppressions; |
| +} |
| + |
| +#endif // LEAK_SANITIZER |