File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,11 @@ static auto OnViolationAction(DiagnosticsInfo info) {
7575 handle.inc_use_count_unsafe ();
7676 }
7777
78- if (flags ().halt_on_error )
78+ if (flags ().halt_on_error ) {
79+ if (flags ().print_stats_on_exit )
80+ PrintStatisticsSummary ();
7981 Die ();
82+ }
8083 };
8184}
8285
Original file line number Diff line number Diff line change 11// RUN: %clangxx -fsanitize=realtime %s -o %t
2- // RUN: env RTSAN_OPTIONS="halt_on_error=false,print_stats_on_exit=true" %run %t 2>&1 | FileCheck %s
2+ // RUN: %env_rtsan_opts="halt_on_error=false,print_stats_on_exit=true" %run %t 2>&1 | FileCheck %s
3+ // RUN: %env_rtsan_opts="halt_on_error=true,print_stats_on_exit=true" not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-HALT
34
45// UNSUPPORTED: ios
56
@@ -22,3 +23,7 @@ int main() {
2223// CHECK: RealtimeSanitizer exit stats:
2324// CHECK-NEXT: Total error count: 10
2425// CHECK-NEXT: Unique error count: 1
26+
27+ // CHECK-HALT: RealtimeSanitizer exit stats:
28+ // CHECK-HALT-NEXT: Total error count: 1
29+ // CHECK-HALT-NEXT: Unique error count: 1
You can’t perform that action at this time.
0 commit comments