Commit 0a97ab1d authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Remove OFFICIAL_BUILD-specific linux asan options.

According to the comments in
https://chromium-review.googlesource.com/c/chromium/src/+/1882109

Also reorder the options so they have the same order in all
platforms, making it easier to see what's different across platforms.

Bug: none
Change-Id: Ibea9ef89a4fd78e31677f0e43036739ec6ad372c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881636
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Alexander Potapenko <glider@chromium.org>
Reviewed-by: default avatarAlexander Potapenko <glider@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709994}
parent d99bca53
......@@ -30,18 +30,6 @@ void _sanitizer_options_link_helper() { }
#if defined(ADDRESS_SANITIZER)
// Default options for AddressSanitizer in various configurations:
// malloc_context_size=5 - limit the size of stack traces collected by ASan
// for each malloc/free by 5 frames. These stack traces tend to accumulate
// very fast in applications using JIT (v8 in Chrome's case), see
// https://code.google.com/p/address-sanitizer/issues/detail?id=177
// symbolize=1 - enable in-process symbolization.
// legacy_pthread_cond=1 - run in the libpthread 2.2.5 compatibility mode to
// work around libGL.so using the obsolete API, see
// http://crbug.com/341805. This may break if pthread_cond_t objects are
// accessed by both instrumented and non-instrumented binaries (e.g. if
// they reside in shared memory). This option is going to be deprecated in
// upstream AddressSanitizer and must not be used anywhere except the
// official builds.
// 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
......@@ -53,32 +41,23 @@ void _sanitizer_options_link_helper() { }
// so the slow unwinder may not work properly.
// detect_stack_use_after_return=1 - use fake stack to delay the reuse of
// stack allocations and detect stack-use-after-return errors.
// symbolize=1 - enable in-process symbolization.
#if defined(OS_LINUX)
const char kAsanDefaultOptions[] =
#if defined(OFFICIAL_BUILD)
// Default AddressSanitizer options for the official build. These do not
// affect tests on buildbots (which don't set OFFICIAL_BUILD) or
// non-official Chromium builds. These are almost always unused, but
// sometimes we ship asan builds to canary.
"legacy_pthread_cond=1 malloc_context_size=5 "
#else
"detect_stack_use_after_return=1 "
#endif
"symbolize=1 check_printf=1 use_sigaltstack=1 detect_leaks=0 "
"strip_path_prefix=/../../ fast_unwind_on_fatal=1 "
"allow_user_segv_handler=1 ";
"check_printf=1 use_sigaltstack=1 strip_path_prefix=/../../ "
"fast_unwind_on_fatal=1 detect_stack_use_after_return=1 "
"symbolize=1 detect_leaks=0 allow_user_segv_handler=1 ";
#elif defined(OS_MACOSX)
const char *kAsanDefaultOptions =
"check_printf=1 use_sigaltstack=1 "
"strip_path_prefix=/../../ fast_unwind_on_fatal=1 "
"detect_stack_use_after_return=1 detect_odr_violation=0 ";
const char* kAsanDefaultOptions =
"check_printf=1 use_sigaltstack=1 strip_path_prefix=/../../ "
"fast_unwind_on_fatal=1 detect_stack_use_after_return=1 "
"detect_odr_violation=0 ";
#elif defined(OS_WIN)
const char* kAsanDefaultOptions =
"check_printf=1 use_sigaltstack=1 "
"strip_path_prefix=\\..\\..\\ fast_unwind_on_fatal=1 "
"detect_stack_use_after_return=1 ";
"check_printf=1 use_sigaltstack=1 strip_path_prefix=\\..\\..\\ "
"fast_unwind_on_fatal=1 detect_stack_use_after_return=1 ";
#endif // OS_LINUX
#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment