Files
TheRock/compiler/amd-llvm/clang/test/CodeGen/sanitize-metadata-ignorelist.c
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

56 lines
2.3 KiB
C

// RUN: %clang_cc1 -O -fexperimental-sanitize-metadata=atomics -triple x86_64-gnu-linux -x c -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALLOW
// RUN: echo "fun:foo" > %t.fun
// RUN: %clang_cc1 -O -fexperimental-sanitize-metadata=atomics -fexperimental-sanitize-metadata-ignorelist=%t.fun -triple x86_64-gnu-linux -x c -emit-llvm %s -o - | FileCheck %s --check-prefixes=FUN
// RUN: echo "src:*sanitize-metadata-ignorelist.c" > %t.src
// RUN: %clang_cc1 -O -fexperimental-sanitize-metadata=atomics -fexperimental-sanitize-metadata-ignorelist=%t.src -triple x86_64-gnu-linux -x c -emit-llvm %s -o - | FileCheck %s --check-prefixes=SRC
int y;
// ALLOW-LABEL: define {{[^@]+}}@foo
// ALLOW-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] !pcsections !5 {
// ALLOW-NEXT: entry:
// ALLOW-NEXT: [[TMP0:%.*]] = atomicrmw add ptr @y, i32 1 monotonic, align 4, !pcsections !7
// ALLOW-NEXT: ret void
//
// FUN-LABEL: define {{[^@]+}}@foo
// FUN-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] {
// FUN-NEXT: entry:
// FUN-NEXT: [[TMP0:%.*]] = atomicrmw add ptr @y, i32 1 monotonic, align 4
// FUN-NEXT: ret void
//
// SRC-LABEL: define {{[^@]+}}@foo
// SRC-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] {
// SRC-NEXT: entry:
// SRC-NEXT: [[TMP0:%.*]] = atomicrmw add ptr @y, i32 1 monotonic, align 4
// SRC-NEXT: ret void
//
void foo() {
__atomic_fetch_add(&y, 1, __ATOMIC_RELAXED);
}
// ALLOW-LABEL: define {{[^@]+}}@bar
// ALLOW-SAME: () local_unnamed_addr #[[ATTR0]] !pcsections !5 {
// ALLOW-NEXT: entry:
// ALLOW-NEXT: [[TMP0:%.*]] = atomicrmw add ptr @y, i32 2 monotonic, align 4, !pcsections !7
// ALLOW-NEXT: ret void
//
// FUN-LABEL: define {{[^@]+}}@bar
// FUN-SAME: () local_unnamed_addr #[[ATTR0]] !pcsections !5 {
// FUN-NEXT: entry:
// FUN-NEXT: [[TMP0:%.*]] = atomicrmw add ptr @y, i32 2 monotonic, align 4, !pcsections !7
// FUN-NEXT: ret void
//
// SRC-LABEL: define {{[^@]+}}@bar
// SRC-SAME: () local_unnamed_addr #[[ATTR0]] {
// SRC-NEXT: entry:
// SRC-NEXT: [[TMP0:%.*]] = atomicrmw add ptr @y, i32 2 monotonic, align 4
// SRC-NEXT: ret void
//
void bar() {
__atomic_fetch_add(&y, 2, __ATOMIC_RELAXED);
}
// ALLOW: __sanitizer_metadata_covered2.module_ctor
// FUN: __sanitizer_metadata_covered2.module_ctor
// SRC-NOT: __sanitizer_metadata_covered{{.*}}.module_ctor