summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2014-04-24 11:55:17 +0000
committerKostya Serebryany <kcc@google.com>2014-04-24 11:55:17 +0000
commit7afc6b2c723a0838ede28978f2163eeb5da2bd50 (patch)
tree5ea796550e7cc90b81f30ed613495ed3ab10aa0a /compiler-rt
parent24553934f804640b64283c85d451d27b9c79c785 (diff)
downloadbcm5719-llvm-7afc6b2c723a0838ede28978f2163eeb5da2bd50.tar.gz
bcm5719-llvm-7afc6b2c723a0838ede28978f2163eeb5da2bd50.zip
[asan] enable use_sigaltstack by default (this will provide verbose reports on stack-overflow instead of silently crashing with SEGV)
llvm-svn: 207099
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_flags.cc2
-rw-r--r--compiler-rt/test/asan/TestCases/stack-overflow.cc1
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc b/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
index b722b4931b2..cb287dfe799 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
@@ -48,7 +48,7 @@ void SetCommonFlagsDefaults(CommonFlags *f) {
// TODO(glider): tools may want to set different defaults for handle_segv.
f->handle_segv = SANITIZER_NEEDS_SEGV;
f->allow_user_segv_handler = false;
- f->use_sigaltstack = false;
+ f->use_sigaltstack = true;
f->detect_deadlocks = false;
f->clear_shadow_mmap_threshold = 64 * 1024;
f->color = "auto";
diff --git a/compiler-rt/test/asan/TestCases/stack-overflow.cc b/compiler-rt/test/asan/TestCases/stack-overflow.cc
index dce116ee279..12a5250d9bd 100644
--- a/compiler-rt/test/asan/TestCases/stack-overflow.cc
+++ b/compiler-rt/test/asan/TestCases/stack-overflow.cc
@@ -13,6 +13,7 @@
// RUN: %clangxx_asan -O3 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O0 %s -DTHREAD -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O3 %s -DTHREAD -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: not %t 2>&1 | FileCheck %s
#include <assert.h>
#include <stdlib.h>
OpenPOWER on IntegriCloud