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

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

Issue 774483004: Revert of Turn on stack use-after-return detection in non-official ASan builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/debug/proc_maps_linux_unittest.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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, 50 // to print error reports. V8 doesn't generate debug info for the JIT code,
51 // so the slow unwinder may not work properly. 51 // so the slow unwinder may not work properly.
52 // detect_stack_use_after_return=1 - use fake stack to delay the reuse of
53 // stack allocations and detect stack-use-after-return errors.
54 #if defined(OS_LINUX) 52 #if defined(OS_LINUX)
55 #if defined(GOOGLE_CHROME_BUILD) 53 #if defined(GOOGLE_CHROME_BUILD)
56 // Default AddressSanitizer options for the official build. These do not affect 54 // Default AddressSanitizer options for the official build. These do not affect
57 // 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
58 // Chromium builds. 56 // Chromium builds.
59 const char kAsanDefaultOptions[] = 57 const char kAsanDefaultOptions[] =
60 "legacy_pthread_cond=1 malloc_context_size=5 strict_memcmp=0 " 58 "legacy_pthread_cond=1 malloc_context_size=5 strict_memcmp=0 "
61 "symbolize=false check_printf=1 use_sigaltstack=1 detect_leaks=0 " 59 "symbolize=false check_printf=1 use_sigaltstack=1 detect_leaks=0 "
62 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1"; 60 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1";
63 #else 61 #else
64 // Default AddressSanitizer options for buildbots and non-official builds. 62 // Default AddressSanitizer options for buildbots and non-official builds.
65 const char *kAsanDefaultOptions = 63 const char *kAsanDefaultOptions =
66 "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 " 64 "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1 "
67 "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 " 65 "detect_leaks=0 strip_path_prefix=Release/../../ fast_unwind_on_fatal=1";
68 "detect_stack_use_after_return=1 ";
69 #endif // GOOGLE_CHROME_BUILD 66 #endif // GOOGLE_CHROME_BUILD
70 67
71 #elif defined(OS_MACOSX) 68 #elif defined(OS_MACOSX)
72 const char *kAsanDefaultOptions = 69 const char *kAsanDefaultOptions =
73 "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 "
74 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1 "; 71 "strip_path_prefix=Release/../../ fast_unwind_on_fatal=1";
75 static const char kNaClDefaultOptions[] = "handle_segv=0"; 72 static const char kNaClDefaultOptions[] = "handle_segv=0";
76 static const char kNaClFlag[] = "--type=nacl-loader"; 73 static const char kNaClFlag[] = "--type=nacl-loader";
77 #endif // OS_LINUX 74 #endif // OS_LINUX
78 75
79 #if defined(OS_LINUX) || defined(OS_MACOSX) 76 #if defined(OS_LINUX) || defined(OS_MACOSX)
80 extern "C" 77 extern "C"
81 __attribute__((no_sanitize_address)) 78 __attribute__((no_sanitize_address))
82 __attribute__((visibility("default"))) 79 __attribute__((visibility("default")))
83 // 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
84 // stripped by the linker. 81 // stripped by the linker.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 __attribute__((no_sanitize_thread)) 132 __attribute__((no_sanitize_thread))
136 __attribute__((visibility("default"))) 133 __attribute__((visibility("default")))
137 // 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
138 // stripped by the linker. 135 // stripped by the linker.
139 __attribute__((used)) 136 __attribute__((used))
140 const char *__tsan_default_suppressions() { 137 const char *__tsan_default_suppressions() {
141 return kTSanDefaultSuppressions; 138 return kTSanDefaultSuppressions;
142 } 139 }
143 140
144 #endif // THREAD_SANITIZER && OS_LINUX 141 #endif // THREAD_SANITIZER && OS_LINUX
OLDNEW
« no previous file with comments | « base/debug/proc_maps_linux_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698