[clang] [compiler-rt] [ubsan_minimal] Allow UBSan handler from Minimal runtime to acceprt arguments (PR #152192)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 6 10:08:04 PDT 2025


================
@@ -0,0 +1,14 @@
+// RUN: %clang_min_runtime -fsanitize=alignment %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
+
+void f(int &n) {}
+
+int *t;
+
+int main() {
+  int r;
+  t = (int *)(((char *)&r) + 1);
+  // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address 0x{{[[:xdigit:]]+$}}
+  // CHECK-NOT: type-mismatch
+
+  f(*t);
+}
----------------
fmayer wrote:

nit: newline at  EOF

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


More information about the llvm-commits mailing list