forked from OSchip/llvm-project
[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.
llvm-svn: 206872
This commit is contained in:
parent
f7e53446cd
commit
26c4e96455
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue