diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-08-11 00:26:29 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-08-11 00:26:29 +0000 |
commit | a521e597b28e48210f08331f8368923d4f5c4203 (patch) | |
tree | c034dedcf7df68866abc74a35c2920edca389bb0 | |
parent | 60434728da8622157a01ce67ec372f9f4a840894 (diff) |
[asan] abort_on_error=1 by default on Android.
With this change, the default behavior on error is to call abort()
instead of _exit(). This should help the OS to capture a tombstone of
the error.
RAM usage of the lit test suite goes up because of all the tombstone
gathering, so I'm limiting the parallelism of the test target.
Previously it was based on the number of the CPUs on the host
machine, which is definitely wrong.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278308 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/sanitizer_common/sanitizer_flags.inc | 2 | ||||
-rw-r--r-- | test/asan/CMakeLists.txt | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.inc b/lib/sanitizer_common/sanitizer_flags.inc index 8c9bc0e03..3fcfb83e1 100644 --- a/lib/sanitizer_common/sanitizer_flags.inc +++ b/lib/sanitizer_common/sanitizer_flags.inc @@ -213,7 +213,7 @@ COMMON_FLAG(bool, decorate_proc_maps, false, "If set, decorate sanitizer " COMMON_FLAG(int, exitcode, 1, "Override the program exit status if the tool " "found an error") COMMON_FLAG( - bool, abort_on_error, SANITIZER_MAC, + bool, abort_on_error, SANITIZER_ANDROID || SANITIZER_MAC, "If set, the tool calls abort() instead of _exit() after printing the " "error report.") COMMON_FLAG(bool, suppress_equal_pcs, true, diff --git a/test/asan/CMakeLists.txt b/test/asan/CMakeLists.txt index cb32cfba8..82ec8ff0d 100644 --- a/test/asan/CMakeLists.txt +++ b/test/asan/CMakeLists.txt @@ -100,9 +100,15 @@ if(COMPILER_RT_INCLUDE_TESTS) endif() endif() +set(LIT_ARGS) +if(ANDROID) + set(LIT_ARGS -j5) +endif() + add_lit_testsuite(check-asan "Running the AddressSanitizer tests" ${ASAN_TESTSUITES} - DEPENDS ${ASAN_TEST_DEPS}) + DEPENDS ${ASAN_TEST_DEPS} + ARGS ${LIT_ARGS}) set_target_properties(check-asan PROPERTIES FOLDER "Compiler-RT Misc") if(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME) |