Skip to content

Commit 0775459

Browse files
[LLVM][rtsan] Update sanitize_realtime_unsafe test
1 parent 49ed53a commit 0775459

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed
Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5
12
; RUN: opt < %s -passes=rtsan -S | FileCheck %s
23

4+
; RealtimeSanitizer pass should create the demangled function name as a global string and,
5+
; at the function entrypoint, pass it as an argument to the rtsan notify method
6+
7+
;.
8+
; CHECK: @[[GLOB0:[0-9]+]] = private unnamed_addr constant [20 x i8] c"blocking_function()\00", align 1
9+
;.
310
define void @_Z17blocking_functionv() #0 {
11+
; CHECK-LABEL: define void @_Z17blocking_functionv(
12+
; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
13+
; CHECK-NEXT: call void @__rtsan_notify_blocking_call(ptr @[[GLOB0]])
14+
; CHECK-NEXT: ret void
15+
;
416
ret void
517
}
618

719
define noundef i32 @main() #2 {
20+
; CHECK-LABEL: define noundef i32 @main() {
21+
; CHECK-NEXT: call void @_Z17blocking_functionv()
22+
; CHECK-NEXT: ret i32 0
23+
;
824
call void @_Z17blocking_functionv() #4
925
ret i32 0
1026
}
1127

1228
attributes #0 = { mustprogress noinline sanitize_realtime_unsafe optnone ssp uwtable(sync) }
13-
14-
; RealtimeSanitizer pass should create the demangled function name as a global string and,
15-
; at the function entrypoint, pass it as an argument to the rtsan notify method
16-
; CHECK: [[GLOBAL_STR:@[a-zA-Z0-9\.]+]]
17-
; CHECK-SAME: c"blocking_function()\00"
18-
; CHECK-LABEL: @_Z17blocking_functionv()
19-
; CHECK-NEXT: call{{.*}}@__rtsan_notify_blocking_call(ptr{{.*}}[[GLOBAL_STR]])
29+
;.
30+
; CHECK: attributes #[[ATTR0]] = { mustprogress noinline optnone sanitize_realtime_unsafe ssp uwtable(sync) }
31+
;.

0 commit comments

Comments
 (0)