[llvm] [ubsan] Pass fsanitize-skip-hot-cutoff into -fsanitize=bounds (PR #122576)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 09:56:32 PST 2025


================
@@ -1025,6 +1029,14 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
       PB.registerScalarOptimizerLateEPCallback([this](FunctionPassManager &FPM,
                                                       OptimizationLevel Level) {
         BoundsCheckingPass::Options Options;
+        if (CodeGenOpts.SanitizeSkipHotCutoffs[SanitizerKind::SO_LocalBounds] ||
+            ClSanitizeGuardChecks) {
+          static_assert(SanitizerKind::SO_LocalBounds <=
+                            std::numeric_limits<
+                                decltype(Options.GuardKind)::value_type>::max(),
+                        "Update type of llvm.allow.ubsan.check.");
----------------
fmayer wrote:

"Update type of llvm.allow.ubsan.check to represent SanitizerKind::SO_LocalBounds"?

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


More information about the llvm-commits mailing list