Skip to content

Commit 7cfc1b7

Browse files
committed
[PR] fmayer - Add check that init happens in global ctor
1 parent 7571304 commit 7cfc1b7

File tree

1 file changed

+6
-3
lines changed
  • llvm/test/Instrumentation/RealtimeSanitizer

1 file changed

+6
-3
lines changed

llvm/test/Instrumentation/RealtimeSanitizer/rtsan.ll

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ define noundef i32 @main() #2 {
1818

1919
attributes #0 = { mustprogress noinline sanitize_realtime optnone ssp uwtable(sync) }
2020

21+
; RealtimeSanitizer pass should insert call to initialize the runtime
22+
; CHECK: @llvm.used = appending global [1 x ptr] [ptr @rtsan.module_ctor]
23+
; CHECK: @llvm.global_ctors = {{.*}}@rtsan.module_ctor
24+
2125
; RealtimeSanitizer pass should insert __rtsan_realtime_enter right after function definition
2226
; CHECK-LABEL: @violation()
2327
; CHECK-NEXT: call{{.*}}@__rtsan_realtime_enter
@@ -26,6 +30,5 @@ attributes #0 = { mustprogress noinline sanitize_realtime optnone ssp uwtable(sy
2630
; CHECK: call{{.*}}@__rtsan_realtime_exit
2731
; CHECK-NEXT: ret{{.*}}void
2832

29-
; RealtimeSanitizer pass should insert call to initialize the runtime
30-
; CHECK: define internal void @rtsan.module_ctor()
31-
; CHECK: call void @__rtsan_ensure_initialized()
33+
; CHECK-LABEL: define internal void @rtsan.module_ctor()
34+
; CHECK-NEXT: call void @__rtsan_ensure_initialized()

0 commit comments

Comments
 (0)