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

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

Issue 1072553002: ASan: re-enable intrinsics interposition on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // symbolize=false - disable the in-process symbolization, which isn't 100% 43 // symbolize=false - disable the in-process symbolization, which isn't 100%
44 // compatible with the existing sandboxes and doesn't make much sense for 44 // compatible with the existing sandboxes and doesn't make much sense for
45 // stripped official binaries. 45 // stripped official binaries.
46 // legacy_pthread_cond=1 - run in the libpthread 2.2.5 compatibility mode to 46 // legacy_pthread_cond=1 - run in the libpthread 2.2.5 compatibility mode to
47 // work around libGL.so using the obsolete API, see 47 // work around libGL.so using the obsolete API, see
48 // http://crbug.com/341805. This may break if pthread_cond_t objects are 48 // http://crbug.com/341805. This may break if pthread_cond_t objects are
49 // accessed by both instrumented and non-instrumented binaries (e.g. if 49 // accessed by both instrumented and non-instrumented binaries (e.g. if
50 // they reside in shared memory). This option is going to be deprecated in 50 // they reside in shared memory). This option is going to be deprecated in
51 // upstream AddressSanitizer and must not be used anywhere except the 51 // upstream AddressSanitizer and must not be used anywhere except the
52 // official builds. 52 // official builds.
53 // replace_intrin=0 - do not intercept memcpy(), memmove() and memset() to
54 // work around http://crbug.com/162461 (ASan report in OpenCL on Mac).
55 // check_printf=1 - check the memory accesses to printf (and other formatted 53 // check_printf=1 - check the memory accesses to printf (and other formatted
56 // output routines) arguments. 54 // output routines) arguments.
57 // use_sigaltstack=1 - handle signals on an alternate signal stack. Useful 55 // use_sigaltstack=1 - handle signals on an alternate signal stack. Useful
58 // for stack overflow detection. 56 // for stack overflow detection.
59 // strip_path_prefix=Release/../../ - prefixes up to and including this 57 // strip_path_prefix=Release/../../ - prefixes up to and including this
60 // substring will be stripped from source file paths in symbolized reports 58 // substring will be stripped from source file paths in symbolized reports
61 // (if symbolize=true, which is set when running with LeakSanitizer). 59 // (if symbolize=true, which is set when running with LeakSanitizer).
62 // fast_unwind_on_fatal=1 - use the fast (frame-pointer-based) stack unwinder 60 // fast_unwind_on_fatal=1 - use the fast (frame-pointer-based) stack unwinder
63 // to print error reports. V8 doesn't generate debug info for the JIT code, 61 // to print error reports. V8 doesn't generate debug info for the JIT code,
64 // so the slow unwinder may not work properly. 62 // so the slow unwinder may not work properly.
(...skipping 11 matching lines...) Expand all
76 #else 74 #else
77 // Default AddressSanitizer options for buildbots and non-official builds. 75 // Default AddressSanitizer options for buildbots and non-official builds.
78 const char *kAsanDefaultOptions = 76 const char *kAsanDefaultOptions =
79 "symbolize=false check_printf=1 use_sigaltstack=1 " 77 "symbolize=false check_printf=1 use_sigaltstack=1 "
80 "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " 78 "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 "
81 "detect_stack_use_after_return=1 "; 79 "detect_stack_use_after_return=1 ";
82 #endif // GOOGLE_CHROME_BUILD 80 #endif // GOOGLE_CHROME_BUILD
83 81
84 #elif defined(OS_MACOSX) 82 #elif defined(OS_MACOSX)
85 const char *kAsanDefaultOptions = 83 const char *kAsanDefaultOptions =
86 "replace_intrin=0 check_printf=1 use_sigaltstack=1 " 84 "check_printf=1 use_sigaltstack=1 "
87 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " 85 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 "
88 "detect_stack_use_after_return=1 detect_odr_violation=0 "; 86 "detect_stack_use_after_return=1 detect_odr_violation=0 ";
89 static const char kNaClDefaultOptions[] = "handle_segv=0"; 87 static const char kNaClDefaultOptions[] = "handle_segv=0";
90 static const char kNaClFlag[] = "--type=nacl-loader"; 88 static const char kNaClFlag[] = "--type=nacl-loader";
91 #endif // OS_LINUX 89 #endif // OS_LINUX
92 90
93 #if defined(OS_LINUX) || defined(OS_MACOSX) 91 #if defined(OS_LINUX) || defined(OS_MACOSX)
94 SANITIZER_HOOK_ATTRIBUTE const char *__asan_default_options() { 92 SANITIZER_HOOK_ATTRIBUTE const char *__asan_default_options() {
95 #if defined(OS_MACOSX) 93 #if defined(OS_MACOSX)
96 char*** argvp = _NSGetArgv(); 94 char*** argvp = _NSGetArgv();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return kLsanDefaultOptions; 155 return kLsanDefaultOptions;
158 } 156 }
159 157
160 extern "C" char kLSanDefaultSuppressions[]; 158 extern "C" char kLSanDefaultSuppressions[];
161 159
162 SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_suppressions() { 160 SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_suppressions() {
163 return kLSanDefaultSuppressions; 161 return kLSanDefaultSuppressions;
164 } 162 }
165 163
166 #endif // LEAK_SANITIZER 164 #endif // LEAK_SANITIZER
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698