[llvm] Rtsan/blocking 2 llvm pass (PR #109543)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 22 06:35:46 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
----------------
cjappl wrote:

old name is in this comment.

You may consider making this comment less specific so it doesn't fall out of style as quickly "RTSan pass should insert a function call to notify the runtime of an illegal call - it passes in the demangled name of the function it is called from"

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


More information about the llvm-commits mailing list