[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

Chris Apple via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 07:17:44 PDT 2024


================
@@ -845,6 +845,12 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
   if (SanOpts.has(SanitizerKind::ShadowCallStack))
     Fn->addFnAttr(llvm::Attribute::ShadowCallStack);
 
+  if (SanOpts.has(SanitizerKind::Realtime)) {
+    for (const FunctionEffectWithCondition &Fe : FD->getFunctionEffects())
+      if (Fe.Effect.kind() == FunctionEffect::Kind::NonBlocking)
+        Fn->addFnAttr(llvm::Attribute::SanitizeRealtime);
+  }
----------------
cjappl wrote:

@dougsonos , would love some eyes on this to make sure this makes sense to you!

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


More information about the cfe-commits mailing list