File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ static InitializationState GetInitializationState() {
44
44
atomic_load (&rtsan_initialized, memory_order_acquire));
45
45
}
46
46
47
- static auto DefaultErrorAction (DiagnosticsInfo info) {
47
+ static auto OnViolationAction (DiagnosticsInfo info) {
48
48
return [info]() {
49
49
__rtsan::PrintDiagnostics (info);
50
50
if (flags ().halt_on_error )
@@ -107,17 +107,17 @@ __rtsan_notify_intercepted_call(const char *func_name) {
107
107
__rtsan_ensure_initialized ();
108
108
GET_CALLER_PC_BP;
109
109
ExpectNotRealtime (GetContextForThisThread (),
110
- DefaultErrorAction ({DiagnosticsInfoType::InterceptedCall,
111
- func_name, pc, bp}));
110
+ OnViolationAction ({DiagnosticsInfoType::InterceptedCall,
111
+ func_name, pc, bp}));
112
112
}
113
113
114
114
SANITIZER_INTERFACE_ATTRIBUTE void
115
115
__rtsan_notify_blocking_call (const char *func_name) {
116
116
__rtsan_ensure_initialized ();
117
117
GET_CALLER_PC_BP;
118
118
ExpectNotRealtime (GetContextForThisThread (),
119
- DefaultErrorAction ({DiagnosticsInfoType::BlockingCall,
120
- func_name, pc, bp}));
119
+ OnViolationAction ({DiagnosticsInfoType::BlockingCall,
120
+ func_name, pc, bp}));
121
121
}
122
122
123
123
} // extern "C"
Original file line number Diff line number Diff line change 1
1
// RUN: %clangxx -fsanitize=realtime %s -o %t
2
- // RUN: env RTSAN_OPTIONS="halt_on_error=false" %run %t 2>&1 | FileCheck %s
2
+ // RUN: %env_rtsan_opts="halt_on_error=true" not %run %t 2>&1 | FileCheck %s
3
+ // RUN: %env_rtsan_opts="halt_on_error=false" %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK-NO-HALT,CHECK
3
4
// UNSUPPORTED: ios
4
5
5
6
// Intent: Ensure that halt_on_error does not exit on the first violation.
@@ -20,6 +21,6 @@ int main() {
20
21
return 0 ;
21
22
// CHECK: ==ERROR: RealtimeSanitizer
22
23
// CHECK-NEXT: {{.*`malloc`.*}}
23
- // CHECK: ==ERROR: RealtimeSanitizer
24
- // CHECK-NEXT: {{.*`free`.*}}
24
+ // CHECK-NO-HALT : ==ERROR: RealtimeSanitizer
25
+ // CHECK-NO-HALT- NEXT: {{.*`free`.*}}
25
26
}
You can’t perform that action at this time.
0 commit comments