[llvm-branch-commits] [clang] [Clang] Add support for the `-fsanitize=concurrency` runtime (PR #225781)

Yaxun Liu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Sep 24 05:05:44 PDT 2026


================
@@ -23,6 +23,21 @@
 // RUN: not %clang --target=x86_64-linux-gnu -fsanitize=leak,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANT
 // CHECK-SANL-SANT: '-fsanitize=leak' not allowed with '-fsanitize=thread'
 
+// RUN: %clang --target=x86_64-linux-gnu -fsanitize=concurrency %s -### 2>&1 \
+// RUN:     -resource-dir=%S/Inputs/resource_dir \
+// RUN:   | FileCheck %s --check-prefix=CHECK-SANC-X64
+// CHECK-SANC-X64: "-fsanitize=concurrency"
+// CHECK-SANC-X64: libclang_rt.csan.a
+
+// RUN: %clang --target=amdgcn-amd-amdhsa -mcpu=gfx900 -nogpulib -fsanitize=concurrency %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANC-AMDGPU
----------------
yxsamliu wrote:

Could we add HIP/OpenMP `-###` tests for this path? They should check the device `-fsanitize=concurrency` option and the host links for `csan`, `csan_offload`, and `-u __csan_offload_init`.

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


More information about the llvm-branch-commits mailing list