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 28 matching lines...) Expand all Loading... |
39 // official builds. | 39 // official builds. |
40 // replace_intrin=0 - do not intercept memcpy(), memmove() and memset() to | 40 // replace_intrin=0 - do not intercept memcpy(), memmove() and memset() to |
41 // work around http://crbug.com/162461 (ASan report in OpenCL on Mac). | 41 // work around http://crbug.com/162461 (ASan report in OpenCL on Mac). |
42 // check_printf=1 - check the memory accesses to printf (and other formatted | 42 // check_printf=1 - check the memory accesses to printf (and other formatted |
43 // output routines) arguments. | 43 // output routines) arguments. |
44 // use_sigaltstack=1 - handle signals on an alternate signal stack. Useful | 44 // use_sigaltstack=1 - handle signals on an alternate signal stack. Useful |
45 // for stack overflow detection. | 45 // for stack overflow detection. |
46 // strip_path_prefix=Release/../../ - prefixes up to and including this | 46 // strip_path_prefix=Release/../../ - prefixes up to and including this |
47 // substring will be stripped from source file paths in symbolized reports | 47 // substring will be stripped from source file paths in symbolized reports |
48 // (if symbolize=true, which is set when running with LeakSanitizer). | 48 // (if symbolize=true, which is set when running with LeakSanitizer). |
| 49 // fast_unwind_on_fatal=1 - use the fast (frame-pointer-based) stack unwinder |
| 50 // to print error reports. V8 doesn't generate debug info for the JIT code, |
| 51 // so the slow unwinder may not work properly. |
49 #if defined(OS_LINUX) | 52 #if defined(OS_LINUX) |
50 #if defined(GOOGLE_CHROME_BUILD) | 53 #if defined(GOOGLE_CHROME_BUILD) |
51 // Default AddressSanitizer options for the official build. These do not affect | 54 // Default AddressSanitizer options for the official build. These do not affect |
52 // tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official | 55 // tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official |
53 // Chromium builds. | 56 // Chromium builds. |
54 const char kAsanDefaultOptions[] = | 57 const char kAsanDefaultOptions[] = |
55 "legacy_pthread_cond=1 malloc_context_size=5 strict_memcmp=0 " | 58 "legacy_pthread_cond=1 malloc_context_size=5 strict_memcmp=0 " |
56 "symbolize=false check_printf=1 use_sigaltstack=1 detect_leaks=0 " | 59 "symbolize=false check_printf=1 use_sigaltstack=1 detect_leaks=0 " |
57 "strip_path_prefix=Release/../../ "; | 60 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1"; |
58 #else | 61 #else |
59 // Default AddressSanitizer options for buildbots and non-official builds. | 62 // Default AddressSanitizer options for buildbots and non-official builds. |
60 const char *kAsanDefaultOptions = | 63 const char *kAsanDefaultOptions = |
61 "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 " | 64 "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 " |
62 "detect_leaks=0 strip_path_prefix=Release/../../ "; | 65 "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1"; |
63 #endif // GOOGLE_CHROME_BUILD | 66 #endif // GOOGLE_CHROME_BUILD |
64 | 67 |
65 #elif defined(OS_MACOSX) | 68 #elif defined(OS_MACOSX) |
66 const char *kAsanDefaultOptions = | 69 const char *kAsanDefaultOptions = |
67 "strict_memcmp=0 replace_intrin=0 check_printf=1 use_sigaltstack=1 " | 70 "strict_memcmp=0 replace_intrin=0 check_printf=1 use_sigaltstack=1 " |
68 "strip_path_prefix=Release/../../ "; | 71 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1"; |
69 static const char kNaClDefaultOptions[] = "handle_segv=0"; | 72 static const char kNaClDefaultOptions[] = "handle_segv=0"; |
70 static const char kNaClFlag[] = "--type=nacl-loader"; | 73 static const char kNaClFlag[] = "--type=nacl-loader"; |
71 #endif // OS_LINUX | 74 #endif // OS_LINUX |
72 | 75 |
73 #if defined(OS_LINUX) || defined(OS_MACOSX) | 76 #if defined(OS_LINUX) || defined(OS_MACOSX) |
74 extern "C" | 77 extern "C" |
75 __attribute__((no_sanitize_address)) | 78 __attribute__((no_sanitize_address)) |
76 __attribute__((visibility("default"))) | 79 __attribute__((visibility("default"))) |
77 // The function isn't referenced from the executable itself. Make sure it isn't | 80 // The function isn't referenced from the executable itself. Make sure it isn't |
78 // stripped by the linker. | 81 // stripped by the linker. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 __attribute__((no_sanitize_thread)) | 132 __attribute__((no_sanitize_thread)) |
130 __attribute__((visibility("default"))) | 133 __attribute__((visibility("default"))) |
131 // The function isn't referenced from the executable itself. Make sure it isn't | 134 // The function isn't referenced from the executable itself. Make sure it isn't |
132 // stripped by the linker. | 135 // stripped by the linker. |
133 __attribute__((used)) | 136 __attribute__((used)) |
134 const char *__tsan_default_suppressions() { | 137 const char *__tsan_default_suppressions() { |
135 return kTSanDefaultSuppressions; | 138 return kTSanDefaultSuppressions; |
136 } | 139 } |
137 | 140 |
138 #endif // THREAD_SANITIZER && OS_LINUX | 141 #endif // THREAD_SANITIZER && OS_LINUX |
OLD | NEW |