[PATCH] D67193: [UBSan] Do not overwrite the default print_summary sanitizer option.
Max Moroz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 12:32:39 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL371442: [UBSan] Do not overwrite the default print_summary sanitizer option. (authored by Dor1s, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67193/new/
https://reviews.llvm.org/D67193
Files:
compiler-rt/trunk/lib/ubsan/ubsan_flags.cpp
compiler-rt/trunk/test/ubsan/TestCases/Misc/print_summary.c
Index: compiler-rt/trunk/test/ubsan/TestCases/Misc/print_summary.c
===================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/Misc/print_summary.c
+++ compiler-rt/trunk/test/ubsan/TestCases/Misc/print_summary.c
@@ -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;
+}
Index: compiler-rt/trunk/lib/ubsan/ubsan_flags.cpp
===================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_flags.cpp
+++ compiler-rt/trunk/lib/ubsan/ubsan_flags.cpp
@@ -54,7 +54,6 @@
{
CommonFlags cf;
cf.CopyFrom(*common_flags());
- cf.print_summary = false;
cf.external_symbolizer_path = GetFlag("UBSAN_SYMBOLIZER_PATH");
OverrideCommonFlags(cf);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67193.219411.patch
Type: text/x-patch
Size: 1136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190909/fc06e6d6/attachment.bin>
More information about the llvm-commits
mailing list