[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun May 19 20:10:28 PDT 2024
================
@@ -0,0 +1,50 @@
+//===--- radsan.h - Realtime Sanitizer --------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+//===----------------------------------------------------------------------===//
+
+#pragma once
+
+#include "sanitizer_common/sanitizer_internal_defs.h"
+
+extern "C" {
+
+/** Initialise radsan interceptors.
+
+ A call to this method is added to the preinit array on Linux systems.
+*/
+SANITIZER_INTERFACE_ATTRIBUTE void radsan_init();
+
+/** Enter real-time context.
+
+ When in a real-time context, RADSan interceptors will error if realtime
+ violations are detected. Calls to this method are injected at the code
+ generation stage when RADSan is enabled.
+*/
+SANITIZER_INTERFACE_ATTRIBUTE void radsan_realtime_enter();
----------------
MaskRay wrote:
Use `__*` names to avoid conflicts with user code. Use `//`.
If there are user APIs, define them at `include/sanitizer/*_interface.h`
https://github.com/llvm/llvm-project/pull/92460
More information about the llvm-commits
mailing list