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

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

Issue 2471333003: NOSUBMIT: Reduce ASAN memory consumption on 32-bit Intel Chrome OS (Closed)
Patch Set: Created 4 years, 1 month 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 | « base/threading/platform_thread_linux.cc ('k') | 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // output routines) arguments. 51 // output routines) arguments.
52 // use_sigaltstack=1 - handle signals on an alternate signal stack. Useful 52 // use_sigaltstack=1 - handle signals on an alternate signal stack. Useful
53 // for stack overflow detection. 53 // for stack overflow detection.
54 // strip_path_prefix=/../../ - prefixes up to and including this 54 // strip_path_prefix=/../../ - prefixes up to and including this
55 // substring will be stripped from source file paths in symbolized reports 55 // substring will be stripped from source file paths in symbolized reports
56 // fast_unwind_on_fatal=1 - use the fast (frame-pointer-based) stack unwinder 56 // fast_unwind_on_fatal=1 - use the fast (frame-pointer-based) stack unwinder
57 // to print error reports. V8 doesn't generate debug info for the JIT code, 57 // to print error reports. V8 doesn't generate debug info for the JIT code,
58 // so the slow unwinder may not work properly. 58 // so the slow unwinder may not work properly.
59 // detect_stack_use_after_return=1 - use fake stack to delay the reuse of 59 // detect_stack_use_after_return=1 - use fake stack to delay the reuse of
60 // stack allocations and detect stack-use-after-return errors. 60 // stack allocations and detect stack-use-after-return errors.
61 #if defined(OS_LINUX) 61 // quarantine_size_mb=16 - reduce size of quarantine used to detect use-after-
62 // free errors. Increases risk of false negatives but uses less RAM.
63 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86)
64 // On 32-bit Intel Chrome OS try to reduce ASAN memory consumption with
65 // quarantine_size_mb.
66 const char kAsanDefaultOptions[] =
67 "symbolize=1 check_printf=1 use_sigaltstack=1 "
68 "detect_leaks=0 strip_path_prefix=/../../ fast_unwind_on_fatal=1 "
69 "detect_stack_use_after_return=0 "
70 "quarantine_size_mb=16 ";
71 #elif defined(OS_LINUX)
62 #if defined(GOOGLE_CHROME_BUILD) 72 #if defined(GOOGLE_CHROME_BUILD)
63 // Default AddressSanitizer options for the official build. These do not affect 73 // Default AddressSanitizer options for the official build. These do not affect
64 // tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official 74 // tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official
65 // Chromium builds. 75 // Chromium builds.
66 const char kAsanDefaultOptions[] = 76 const char kAsanDefaultOptions[] =
67 "legacy_pthread_cond=1 malloc_context_size=5 " 77 "legacy_pthread_cond=1 malloc_context_size=5 "
68 "symbolize=1 check_printf=1 use_sigaltstack=1 detect_leaks=0 " 78 "symbolize=1 check_printf=1 use_sigaltstack=1 detect_leaks=0 "
69 "strip_path_prefix=/../../ fast_unwind_on_fatal=1"; 79 "strip_path_prefix=/../../ fast_unwind_on_fatal=1";
70 #else 80 #else
71 // Default AddressSanitizer options for buildbots and non-official builds. 81 // Default AddressSanitizer options for buildbots and non-official builds.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Default options for UndefinedBehaviorSanitizer: 188 // Default options for UndefinedBehaviorSanitizer:
179 // print_stacktrace=1 - print the stacktrace when UBSan reports an error. 189 // print_stacktrace=1 - print the stacktrace when UBSan reports an error.
180 const char kUbsanDefaultOptions[] = 190 const char kUbsanDefaultOptions[] =
181 "print_stacktrace=1 strip_path_prefix=/../../ "; 191 "print_stacktrace=1 strip_path_prefix=/../../ ";
182 192
183 SANITIZER_HOOK_ATTRIBUTE const char* __ubsan_default_options() { 193 SANITIZER_HOOK_ATTRIBUTE const char* __ubsan_default_options() {
184 return kUbsanDefaultOptions; 194 return kUbsanDefaultOptions;
185 } 195 }
186 196
187 #endif // UNDEFINED_SANITIZER 197 #endif // UNDEFINED_SANITIZER
OLDNEW
« no previous file with comments | « base/threading/platform_thread_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698