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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // Default AddressSanitizer options for buildbots and non-official builds. | 64 // Default AddressSanitizer options for buildbots and non-official builds. |
65 const char *kAsanDefaultOptions = | 65 const char *kAsanDefaultOptions = |
66 "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 " | 66 "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 " |
67 "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " | 67 "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " |
68 "detect_stack_use_after_return=1 "; | 68 "detect_stack_use_after_return=1 "; |
69 #endif // GOOGLE_CHROME_BUILD | 69 #endif // GOOGLE_CHROME_BUILD |
70 | 70 |
71 #elif defined(OS_MACOSX) | 71 #elif defined(OS_MACOSX) |
72 const char *kAsanDefaultOptions = | 72 const char *kAsanDefaultOptions = |
73 "strict_memcmp=0 replace_intrin=0 check_printf=1 use_sigaltstack=1 " | 73 "strict_memcmp=0 replace_intrin=0 check_printf=1 use_sigaltstack=1 " |
74 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 "; | 74 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " |
| 75 "detect_stack_use_after_return=1 "; |
75 static const char kNaClDefaultOptions[] = "handle_segv=0"; | 76 static const char kNaClDefaultOptions[] = "handle_segv=0"; |
76 static const char kNaClFlag[] = "--type=nacl-loader"; | 77 static const char kNaClFlag[] = "--type=nacl-loader"; |
77 #endif // OS_LINUX | 78 #endif // OS_LINUX |
78 | 79 |
79 #if defined(OS_LINUX) || defined(OS_MACOSX) | 80 #if defined(OS_LINUX) || defined(OS_MACOSX) |
80 extern "C" | 81 extern "C" |
81 __attribute__((no_sanitize_address)) | 82 __attribute__((no_sanitize_address)) |
82 __attribute__((visibility("default"))) | 83 __attribute__((visibility("default"))) |
83 // The function isn't referenced from the executable itself. Make sure it isn't | 84 // The function isn't referenced from the executable itself. Make sure it isn't |
84 // stripped by the linker. | 85 // stripped by the linker. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 __attribute__((no_sanitize_thread)) | 136 __attribute__((no_sanitize_thread)) |
136 __attribute__((visibility("default"))) | 137 __attribute__((visibility("default"))) |
137 // 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 |
138 // stripped by the linker. | 139 // stripped by the linker. |
139 __attribute__((used)) | 140 __attribute__((used)) |
140 const char *__tsan_default_suppressions() { | 141 const char *__tsan_default_suppressions() { |
141 return kTSanDefaultSuppressions; | 142 return kTSanDefaultSuppressions; |
142 } | 143 } |
143 | 144 |
144 #endif // THREAD_SANITIZER && OS_LINUX | 145 #endif // THREAD_SANITIZER && OS_LINUX |
OLD | NEW |