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

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

Issue 2731393003: Set allow_user_segv_handler asan option (Closed)
Patch Set: Created 3 years, 9 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 // 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 #if defined(OS_LINUX)
62 #if defined(GOOGLE_CHROME_BUILD) 62 #if defined(GOOGLE_CHROME_BUILD)
63 // Default AddressSanitizer options for the official build. These do not affect 63 // 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 64 // tests on buildbots (which don't set GOOGLE_CHROME_BUILD) or non-official
65 // Chromium builds. 65 // Chromium builds.
66 const char kAsanDefaultOptions[] = 66 const char kAsanDefaultOptions[] =
67 "legacy_pthread_cond=1 malloc_context_size=5 " 67 "legacy_pthread_cond=1 malloc_context_size=5 "
68 "symbolize=1 check_printf=1 use_sigaltstack=1 detect_leaks=0 " 68 "symbolize=1 check_printf=1 use_sigaltstack=1 detect_leaks=0 "
69 "strip_path_prefix=/../../ fast_unwind_on_fatal=1"; 69 "strip_path_prefix=/../../ fast_unwind_on_fatal=1"
70 "allow_user_segv_handler=1 ";
70 #else 71 #else
71 // Default AddressSanitizer options for buildbots and non-official builds. 72 // Default AddressSanitizer options for buildbots and non-official builds.
72 const char *kAsanDefaultOptions = 73 const char* kAsanDefaultOptions =
73 "symbolize=1 check_printf=1 use_sigaltstack=1 " 74 "symbolize=1 check_printf=1 use_sigaltstack=1 "
74 "detect_leaks=0 strip_path_prefix=/../../ fast_unwind_on_fatal=1 " 75 "detect_leaks=0 strip_path_prefix=/../../ fast_unwind_on_fatal=1 "
75 "detect_stack_use_after_return=1 "; 76 "detect_stack_use_after_return=1 "
77 "allow_user_segv_handler=1 ";
76 #endif // GOOGLE_CHROME_BUILD 78 #endif // GOOGLE_CHROME_BUILD
77 79
78 #elif defined(OS_MACOSX) 80 #elif defined(OS_MACOSX)
79 const char *kAsanDefaultOptions = 81 const char *kAsanDefaultOptions =
80 "check_printf=1 use_sigaltstack=1 " 82 "check_printf=1 use_sigaltstack=1 "
81 "strip_path_prefix=/../../ fast_unwind_on_fatal=1 " 83 "strip_path_prefix=/../../ fast_unwind_on_fatal=1 "
82 "detect_stack_use_after_return=1 detect_odr_violation=0 "; 84 "detect_stack_use_after_return=1 detect_odr_violation=0 ";
83 static const char kNaClDefaultOptions[] = "handle_segv=0"; 85 static const char kNaClDefaultOptions[] = "handle_segv=0";
84 static const char kNaClFlag[] = "--type=nacl-loader"; 86 static const char kNaClFlag[] = "--type=nacl-loader";
85 #endif // OS_LINUX 87 #endif // OS_LINUX
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Default options for UndefinedBehaviorSanitizer: 180 // Default options for UndefinedBehaviorSanitizer:
179 // print_stacktrace=1 - print the stacktrace when UBSan reports an error. 181 // print_stacktrace=1 - print the stacktrace when UBSan reports an error.
180 const char kUbsanDefaultOptions[] = 182 const char kUbsanDefaultOptions[] =
181 "print_stacktrace=1 strip_path_prefix=/../../ "; 183 "print_stacktrace=1 strip_path_prefix=/../../ ";
182 184
183 SANITIZER_HOOK_ATTRIBUTE const char* __ubsan_default_options() { 185 SANITIZER_HOOK_ATTRIBUTE const char* __ubsan_default_options() {
184 return kUbsanDefaultOptions; 186 return kUbsanDefaultOptions;
185 } 187 }
186 188
187 #endif // UNDEFINED_SANITIZER 189 #endif // UNDEFINED_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