[compiler-rt] r371442 - [UBSan] Do not overwrite the default print_summary sanitizer option.
Max Moroz via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 12:30:48 PDT 2019
Author: dor1s
Date: Mon Sep 9 12:30:48 2019
New Revision: 371442
URL: http://llvm.org/viewvc/llvm-project?rev=371442&view=rev
Log:
[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
https://github.com/llvm-mirror/compiler-rt/commit/524e934112a593ac081bf2b05aa0d60a67987f05
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
Added:
compiler-rt/trunk/test/ubsan/TestCases/Misc/print_summary.c
Modified:
compiler-rt/trunk/lib/ubsan/ubsan_flags.cpp
Modified: compiler-rt/trunk/lib/ubsan/ubsan_flags.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_flags.cpp?rev=371442&r1=371441&r2=371442&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_flags.cpp (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_flags.cpp Mon Sep 9 12:30:48 2019
@@ -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);
}
Added: compiler-rt/trunk/test/ubsan/TestCases/Misc/print_summary.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/Misc/print_summary.c?rev=371442&view=auto
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/Misc/print_summary.c (added)
+++ compiler-rt/trunk/test/ubsan/TestCases/Misc/print_summary.c Mon Sep 9 12:30:48 2019
@@ -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;
+}
More information about the llvm-commits
mailing list