[llvm-branch-commits] [compiler-rt] ubsan: Add loop detection runtime and e2e tests for -fsanitize-trap-loop. (PR #179011)

Florian Mayer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 3 15:48:10 PST 2026


================
@@ -0,0 +1,101 @@
+//===-- ubsan_loop_detect.cpp ---------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Runtime support for -fsanitize-trap-loop.
+//
+//===----------------------------------------------------------------------===//
+
+#include <sanitizer/ubsan_interface.h>
+
+#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
----------------
fmayer wrote:

I would just put the whole file into this, and then in the #else have two empty definitions, rather than piecemeal like this

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


More information about the llvm-branch-commits mailing list