[clang] [compiler-rt] [llvm] [compiler-rt][CSan] Add a minimal value-check configuration (PR #244727)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 23 12:00:18 PST 2026


================
@@ -337,13 +360,16 @@ bool ConcurrencySanitizer::sanitizeFunction(Function &F,
       F.hasFnAttribute("sanitize_concurrency_no_checking_at_run_time");
   const bool SanitizeFunction =
       F.hasFnAttribute(Attribute::SanitizeConcurrency) && !SuppressChecking;
+  const bool CheckAtomics = ClInstrumentAtomics && !ClMinimal;
   const bool MayInstrument =
       SanitizeFunction &&
       ((ClInstrumentMemoryAccesses && !Acc.LoadsAndStores.empty()) ||
-       (ClInstrumentAtomics && !Acc.AtomicAccesses.empty()) ||
+       (CheckAtomics && !Acc.AtomicAccesses.empty()) ||
        (ClInstrumentMemIntrinsics && !Acc.MemIntrinCalls.empty()));
-  const bool NeedsRuntimeIgnores = SuppressChecking && Acc.HasCalls;
-  const bool NeedsFuncEntryExit = ClInstrumentFuncEntryExit && Acc.HasCalls;
+  const bool NeedsRuntimeIgnores =
+      SuppressChecking && Acc.HasCalls && !ClMinimal;
----------------
yxsamliu wrote:

Can we keep the ignore scope in minimal mode? Clang uses it to suppress race checks in functions called by `+initialize` and `-dealloc`.

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


More information about the cfe-commits mailing list