[clang] [AllocToken] Test compatibility with -fsanitize=kcfi,memtag (PR #168600)
Marco Elver via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 18 11:28:09 PST 2025
https://github.com/melver created https://github.com/llvm/llvm-project/pull/168600
Test that -fsanitize=alloc-token is compatible with kcfi and memtag, as these should also be possible to combined.
NFC.
>From caf18e20f66b1c40c6fc2961693860385bea2a77 Mon Sep 17 00:00:00 2001
From: Marco Elver <elver at google.com>
Date: Tue, 18 Nov 2025 20:13:37 +0100
Subject: [PATCH] [AllocToken] Test compatibility with -fsanitize=kcfi,memtag
Test that -fsanitize=alloc-token is compatible with kcfi and memtag, as
these should also be possible to combined.
NFC.
---
clang/test/Driver/fsanitize-alloc-token.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/clang/test/Driver/fsanitize-alloc-token.c b/clang/test/Driver/fsanitize-alloc-token.c
index 6d8bda16dfb96..0ffe9abad8053 100644
--- a/clang/test/Driver/fsanitize-alloc-token.c
+++ b/clang/test/Driver/fsanitize-alloc-token.c
@@ -5,6 +5,7 @@
// CHECK-NO-TOKEN-ALLOC-NOT: "-fsanitize=alloc-token"
// RUN: %clang --target=x86_64-linux-gnu -flto -fvisibility=hidden -fno-sanitize-ignorelist -fsanitize=alloc-token,undefined,cfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-COMPATIBLE
+// RUN: %clang --target=aarch64-linux-android -march=armv8-a+memtag -flto -fvisibility=hidden -fsanitize=alloc-token,kcfi,memtag %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-COMPATIBLE
// CHECK-COMPATIBLE: "-fsanitize={{.*}}alloc-token"
// RUN: %clang --target=x86_64-linux-gnu -fsanitize=alloc-token -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MINIMAL
More information about the cfe-commits
mailing list