[compiler-rt] [rtsan][compiler-rt] Introduce __rtsan_notify_blocking_call (PR #109529)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 21 08:46:16 PDT 2024


================
@@ -0,0 +1,34 @@
+// RUN: %clangxx -fsanitize=realtime %s -o %t
+// RUN: not %run %t 2>&1 | FileCheck %s
+// UNSUPPORTED: ios
+
+// Intent: Check that a function marked with [[clang::nonblocking]] cannot call a function that is blocking.
+
+#include <stdio.h>
+#include <stdlib.h>
+
+// TODO: Remove when [[blocking]] is implemented.
+extern "C" void __rtsan_notify_blocking_call(const char *function_name);
----------------
cjappl wrote:

This test exists right now to nail down the output format, and make sure this works as intended. Shortly we will have the proper [[blocking]] attribute and this test will be simplified somewhat

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


More information about the llvm-commits mailing list