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

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

Issue 1069793002: Revert of Disable container overflow check on Linux and Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // use_sigaltstack=1 - handle signals on an alternate signal stack. Useful 59 // use_sigaltstack=1 - handle signals on an alternate signal stack. Useful
60 // for stack overflow detection. 60 // for stack overflow detection.
61 // strip_path_prefix=Release/../../ - prefixes up to and including this 61 // strip_path_prefix=Release/../../ - prefixes up to and including this
62 // substring will be stripped from source file paths in symbolized reports 62 // substring will be stripped from source file paths in symbolized reports
63 // (if symbolize=true, which is set when running with LeakSanitizer). 63 // (if symbolize=true, which is set when running with LeakSanitizer).
64 // fast_unwind_on_fatal=1 - use the fast (frame-pointer-based) stack unwinder 64 // fast_unwind_on_fatal=1 - use the fast (frame-pointer-based) stack unwinder
65 // to print error reports. V8 doesn't generate debug info for the JIT code, 65 // to print error reports. V8 doesn't generate debug info for the JIT code,
66 // so the slow unwinder may not work properly. 66 // so the slow unwinder may not work properly.
67 // detect_stack_use_after_return=1 - use fake stack to delay the reuse of 67 // detect_stack_use_after_return=1 - use fake stack to delay the reuse of
68 // stack allocations and detect stack-use-after-return errors. 68 // stack allocations and detect stack-use-after-return errors.
69 // detect_container_overflow=0 - do not detect overflows in containers
70 // until crbug.com/459632 is fixed.
71 #if defined(OS_LINUX) 69 #if defined(OS_LINUX)
72 #if defined(GOOGLE_CHROME_BUILD) 70 #if defined(GOOGLE_CHROME_BUILD)
73 // Default AddressSanitizer options for the official build. These do not affect 71 // Default AddressSanitizer options for the official build. These do not affect
74 // tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official 72 // tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official
75 // Chromium builds. 73 // Chromium builds.
76 const char kAsanDefaultOptions[] = 74 const char kAsanDefaultOptions[] =
77 "legacy_pthread_cond=1 malloc_context_size=5 strict_memcmp=0 " 75 "legacy_pthread_cond=1 malloc_context_size=5 strict_memcmp=0 "
78 "symbolize=false check_printf=1 use_sigaltstack=1 detect_leaks=0 " 76 "symbolize=false check_printf=1 use_sigaltstack=1 detect_leaks=0 "
79 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " 77 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1";
80 "detect_container_overflow=0 ";
81 #else 78 #else
82 // Default AddressSanitizer options for buildbots and non-official builds. 79 // Default AddressSanitizer options for buildbots and non-official builds.
83 const char *kAsanDefaultOptions = 80 const char *kAsanDefaultOptions =
84 "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 " 81 "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 "
85 "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " 82 "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 "
86 "detect_stack_use_after_return=1 detect_container_overflow=0 "; 83 "detect_stack_use_after_return=1 ";
87 #endif // GOOGLE_CHROME_BUILD 84 #endif // GOOGLE_CHROME_BUILD
88 85
89 #elif defined(OS_MACOSX) 86 #elif defined(OS_MACOSX)
90 const char *kAsanDefaultOptions = 87 const char *kAsanDefaultOptions =
91 "strict_memcmp=0 replace_intrin=0 check_printf=1 use_sigaltstack=1 " 88 "strict_memcmp=0 replace_intrin=0 check_printf=1 use_sigaltstack=1 "
92 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " 89 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 "
93 "detect_stack_use_after_return=1 detect_odr_violation=0 " 90 "detect_stack_use_after_return=1 detect_odr_violation=0 ";
94 "detect_container_overflow=0 ";
95 static const char kNaClDefaultOptions[] = "handle_segv=0"; 91 static const char kNaClDefaultOptions[] = "handle_segv=0";
96 static const char kNaClFlag[] = "--type=nacl-loader"; 92 static const char kNaClFlag[] = "--type=nacl-loader";
97 #endif // OS_LINUX 93 #endif // OS_LINUX
98 94
99 #if defined(OS_LINUX) || defined(OS_MACOSX) 95 #if defined(OS_LINUX) || defined(OS_MACOSX)
100 SANITIZER_HOOK_ATTRIBUTE const char *__asan_default_options() { 96 SANITIZER_HOOK_ATTRIBUTE const char *__asan_default_options() {
101 #if defined(OS_MACOSX) 97 #if defined(OS_MACOSX)
102 char*** argvp = _NSGetArgv(); 98 char*** argvp = _NSGetArgv();
103 int* argcp = _NSGetArgc(); 99 int* argcp = _NSGetArgc();
104 if (!argvp || !argcp) return kAsanDefaultOptions; 100 if (!argvp || !argcp) return kAsanDefaultOptions;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return kLsanDefaultOptions; 153 return kLsanDefaultOptions;
158 } 154 }
159 155
160 extern "C" char kLSanDefaultSuppressions[]; 156 extern "C" char kLSanDefaultSuppressions[];
161 157
162 SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_suppressions() { 158 SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_suppressions() {
163 return kLSanDefaultSuppressions; 159 return kLSanDefaultSuppressions;
164 } 160 }
165 161
166 #endif // LEAK_SANITIZER 162 #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