[llvm] [llvm][rtsan] Add transform pass for sanitize_realtime_unsafe (PR #109543)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 08:54:44 PDT 2024


================
@@ -0,0 +1,19 @@
+; RUN: opt < %s -passes=rtsan -S | FileCheck %s
+
+define void @_Z17blocking_functionv() #0 {
+  ret void
+}
+
+define noundef i32 @main() #2 {
+  call void @_Z17blocking_functionv() #4
+  ret i32 0
+}
+
+attributes #0 = { mustprogress noinline sanitize_realtime_unsafe optnone ssp uwtable(sync) }
+
+; RealtimeSanitizer pass should create the demangled function name as a global string, and
+; pass it as input to an inserted __rtsan_expect_not_realtime call at the function entrypoint
----------------
davidtrevelyan wrote:

Nice idea. Thanks 

https://github.com/llvm/llvm-project/pull/109543


More information about the llvm-commits mailing list