diff options
author | Kostya Serebryany <kcc@google.com> | 2014-04-22 09:17:08 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2014-04-22 09:17:08 +0000 |
commit | 21da9be765290fdf8c01cf4331ade8e39c0004c1 (patch) | |
tree | e2940e8d9bf562403b2d23a6605f43f61ec8cd0f | |
parent | a915ac3430a267bb2984787acc5b096c6c3be879 (diff) |
[sanitizer] enable check_printf by default for asan and tsan. We've been using this flag for a while and it seems to be stable enough for the rest of the world.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206872 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/sanitizer_common/sanitizer_flags.cc | 2 | ||||
-rw-r--r-- | test/asan/TestCases/printf-2.c | 2 | ||||
-rw-r--r-- | test/asan/TestCases/printf-3.c | 2 | ||||
-rw-r--r-- | test/asan/TestCases/printf-4.c | 2 | ||||
-rw-r--r-- | test/asan/TestCases/printf-5.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.cc b/lib/sanitizer_common/sanitizer_flags.cc index 78b9747d8..e3e9aedce 100644 --- a/lib/sanitizer_common/sanitizer_flags.cc +++ b/lib/sanitizer_common/sanitizer_flags.cc @@ -44,7 +44,7 @@ void SetCommonFlagsDefaults(CommonFlags *f) { f->leak_check_at_exit = true; f->allocator_may_return_null = false; f->print_summary = true; - f->check_printf = false; + f->check_printf = true; // TODO(glider): tools may want to set different defaults for handle_segv. f->handle_segv = SANITIZER_NEEDS_SEGV; f->allow_user_segv_handler = false; diff --git a/test/asan/TestCases/printf-2.c b/test/asan/TestCases/printf-2.c index a31d2e56a..80137d742 100644 --- a/test/asan/TestCases/printf-2.c +++ b/test/asan/TestCases/printf-2.c @@ -3,7 +3,7 @@ // strlen() and memcpy() called by printf(). // RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s // RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s #include <stdio.h> #include <stdlib.h> diff --git a/test/asan/TestCases/printf-3.c b/test/asan/TestCases/printf-3.c index 12ecc6485..79f51fe24 100644 --- a/test/asan/TestCases/printf-3.c +++ b/test/asan/TestCases/printf-3.c @@ -1,7 +1,7 @@ // RUN: %clang_asan -O2 %s -o %t // RUN: ASAN_OPTIONS=check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s // RUN: ASAN_OPTIONS=check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// RUN: not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s #include <stdio.h> int main() { diff --git a/test/asan/TestCases/printf-4.c b/test/asan/TestCases/printf-4.c index e93c60ca9..e5f9c4ed7 100644 --- a/test/asan/TestCases/printf-4.c +++ b/test/asan/TestCases/printf-4.c @@ -3,7 +3,7 @@ // strlen() and memcpy() called by puts(). // RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s // RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s #include <stdio.h> int main() { diff --git a/test/asan/TestCases/printf-5.c b/test/asan/TestCases/printf-5.c index 5e90e734f..58f582256 100644 --- a/test/asan/TestCases/printf-5.c +++ b/test/asan/TestCases/printf-5.c @@ -2,7 +2,7 @@ // We need replace_intrin=0 to avoid reporting errors in memcpy. // RUN: ASAN_OPTIONS=replace_intrin=0:check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s // RUN: ASAN_OPTIONS=replace_intrin=0:check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: ASAN_OPTIONS=replace_intrin=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// RUN: ASAN_OPTIONS=replace_intrin=0 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s #include <stdio.h> #include <string.h> |