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

Unified Diff: base/debug/sanitizer_options.cc

Issue 253753003: Enable use_sigaltstack=1 for ASan builds. This will ease the stack overflow detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move __NR_sigaltstack to baseline_policy.cc Created 6 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 side-by-side diff with in-line comments
Download patch
Index: base/debug/sanitizer_options.cc
diff --git a/base/debug/sanitizer_options.cc b/base/debug/sanitizer_options.cc
index 4dc6d17d94301d63e41f66027fc6b6633bf55324..e72f371b3e15d9c87111dda428189016c935b3b4 100644
--- a/base/debug/sanitizer_options.cc
+++ b/base/debug/sanitizer_options.cc
@@ -36,6 +36,8 @@ void _sanitizer_options_link_helper() { }
// work around http://crbug.com/162461 (ASan report in OpenCL on Mac).
// check_printf=1 - check the memory accesses to printf (and other formatted
// output routines) arguments.
+// use_sigaltstack=1 - handle signals on an alternate signal stack. Useful
Nico 2014/04/30 15:23:39 Typo use_sigalstack (missing n) …oh, below too, s
Alexander Potapenko 2014/04/30 16:08:15 That's named after the sigaltstack() function :)
+// for stack overflow detection.
#if defined(OS_LINUX)
#if defined(GOOGLE_CHROME_BUILD)
// Default AddressSanitizer options for the official build. These do not affect
@@ -43,16 +45,16 @@ void _sanitizer_options_link_helper() { }
// Chromium builds.
const char kAsanDefaultOptions[] =
"legacy_pthread_cond=1 malloc_context_size=5 strict_memcmp=0 "
- "symbolize=false check_printf=1";
+ "symbolize=false check_printf=1 use_sigaltstack=1";
#else
// Default AddressSanitizer options for buildbots and non-official builds.
const char *kAsanDefaultOptions =
- "strict_memcmp=0 symbolize=false check_printf=1";
+ "strict_memcmp=0 symbolize=false check_printf=1 use_sigaltstack=1";
#endif // GOOGLE_CHROME_BUILD
#elif defined(OS_MACOSX)
const char *kAsanDefaultOptions =
- "strict_memcmp=0 replace_intrin=0 check_printf=1";
+ "strict_memcmp=0 replace_intrin=0 check_printf=1 use_sigaltstack=1";
#endif // OS_LINUX
#if defined(OS_LINUX) || defined(OS_MACOSX)
« no previous file with comments | « no previous file | sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc » ('j') | sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698