Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: build/sanitizers/sanitizer_options.cc

Issue 924923002: Add default options/suppressions for LeakSanitizer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make suppressions file nonempty Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file contains the default options for various compiler-based dynamic 5 // This file contains the default options for various compiler-based dynamic
6 // tools. 6 // tools.
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(ADDRESS_SANITIZER) && defined(OS_MACOSX) 10 #if defined(ADDRESS_SANITIZER) && defined(OS_MACOSX)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 __attribute__((no_sanitize_thread)) 136 __attribute__((no_sanitize_thread))
137 __attribute__((visibility("default"))) 137 __attribute__((visibility("default")))
138 // The function isn't referenced from the executable itself. Make sure it isn't 138 // The function isn't referenced from the executable itself. Make sure it isn't
139 // stripped by the linker. 139 // stripped by the linker.
140 __attribute__((used)) 140 __attribute__((used))
141 const char *__tsan_default_suppressions() { 141 const char *__tsan_default_suppressions() {
142 return kTSanDefaultSuppressions; 142 return kTSanDefaultSuppressions;
143 } 143 }
144 144
145 #endif // THREAD_SANITIZER && OS_LINUX 145 #endif // THREAD_SANITIZER && OS_LINUX
146
147 #if defined(LEAK_SANITIZER)
148 // Default options for LeakSanitizer:
149 // print_suppressions=1 - print the list of matched suppressions.
150 // strip_path_prefix=Release/../../ - prefixes up to and including this
151 // substring will be stripped from source file paths in symbolized reports.
152 const char kLsanDefaultOptions[] =
153 "print_suppressions=1 strip_path_prefix=Release/../../ ";
154
155 extern "C"
156 __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.
157 __attribute__((visibility("default")))
158 // The function isn't referenced from the executable itself. Make sure it isn't
159 // stripped by the linker.
160 __attribute__((used))
161 const char *__lsan_default_options() {
162 return kLsanDefaultOptions;
163 }
164
165 extern "C" char kLSanDefaultSuppressions[];
166
167 extern "C"
168 __attribute__((no_sanitize_thread))
169 __attribute__((visibility("default")))
170 // The function isn't referenced from the executable itself. Make sure it isn't
171 // stripped by the linker.
172 __attribute__((used))
173 const char *__lsan_default_suppressions() {
174 return kLSanDefaultSuppressions;
175 }
176
177 #endif // LEAK_SANITIZER
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698