[UBSan] Do not overwrite the default print_summary sanitizer option.

Summary:
This option is true by default in sanitizer common. The default
false value was added a while ago without any reasoning in
524e934112

so, presumably it's safe to remove for consistency.

Reviewers: hctim, samsonov, morehouse, kcc, vitalybuka

Reviewed By: hctim, samsonov, vitalybuka

Subscribers: delcypher, #sanitizers, llvm-commits, kcc

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D67193

llvm-svn: 371442
This commit is contained in:
Max Moroz 2019-09-09 19:30:48 +00:00
parent 20aafa3156
commit 9508738cd1
2 changed files with 11 additions and 1 deletions

View File

@ -54,7 +54,6 @@ void InitializeFlags() {
{
CommonFlags cf;
cf.CopyFrom(*common_flags());
cf.print_summary = false;
cf.external_symbolizer_path = GetFlag("UBSAN_SYMBOLIZER_PATH");
OverrideCommonFlags(cf);
}

View File

@ -0,0 +1,11 @@
// RUN: %clang -fsanitize=undefined %s -O3 -o %t
// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-DEFAULT
// RUN: %env_ubsan_opts=print_summary=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NO_SUMMARY
// CHECK-DEFAULT: SUMMARY: UndefinedBehaviorSanitizer: {{.*}}
// CHECK-NO_SUMMARY-NOT: SUMMARY: UndefinedBehaviorSanitizer: {{.*}}
int main(int argc, char **argv) {
int arr[argc - 2];
return 0;
}