OLD | NEW |
---|---|
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 Loading... | |
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 | |
OLD | NEW |