Skip to content

Commit 5b3cf62

Browse files
committed
[ci] Suppress the LLVM 22 Valgrind clang bitfield false positives.
The row's memcheck errors are all one Memcheck false positive: its cheap unsigned-compare rule taints clang's `word >=u (1<<k)` lowering of a bitfield test over a partially-defined word. All 2116 errors top out in two clang functions -- FunctionProtoType's constructor and CodeGenModule::SetLLVMFunctionAttributesForDefinition -- none in a clad frame. Replace --gen-suppressions=all with test/clad-valgrind-llvm22.supp, scoped by top frame to those two functions so a genuine uninitialised-value error anywhere else still fails the row. Five tests still fail for real reasons that are not in a clang frame -- a clad::array over-read, a delegating-constructor new/free mismatch, a realloc use-after-free, and uninitialised locals in the f3 test source -- so keep a tracked XFAIL: valgrind on each until the fixes land as separate PRs. clang false positive: llvm/llvm-project#194147 Valgrind Memcheck fix: https://bugs.kde.org/show_bug.cgi?id=523434
1 parent 9f2e636 commit 5b3cf62

51 files changed

Lines changed: 56 additions & 51 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ jobs:
101101
extra_packages: 'libtrilinos-kokkos-dev ninja-build'
102102
extra_cmake_options: '-G Ninja'
103103

104-
- name: ubu24-clang19-runtime20-vg
104+
- name: ubu24-clang20-runtime22-vg
105105
os: ubuntu-24.04
106-
compiler: clang-19
106+
compiler: clang-20
107107
extra_packages: 'valgrind'
108108
extra_cmake_options: '-DCLAD_TEST_USE_VG=On'
109-
clang-runtime: '20'
109+
clang-runtime: '22'
110110

111111
- name: ubu24-arm-clang16-runtime17-shared-libs
112112
os: ubuntu-24.04-arm

test/Analyses/ActivityReverse.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
// RUN: ./Activity.out | %filecheck_exec %s
33
// RUN: %cladclang -Xclang -plugin-arg-clad -Xclang -enable-va -Xclang -plugin-arg-clad -Xclang -disable-tbr %s -I%S/../../include -oActivity.out
44
// RUN: ./Activity.out | %filecheck_exec %s
5-
//CHECK-NOT: {{.*error|warning|note:.*}}
5+
// FIXME: f3 reads uninitialised locals (test-source UB); drop when addressed.
66
// XFAIL: valgrind
7+
//CHECK-NOT: {{.*error|warning|note:.*}}
78

89
#include "clad/Differentiator/Differentiator.h"
910

test/Analyses/TBR.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// RUN: ./TBR.out | %filecheck_exec %s
33
// RUN: %cladclang %s -I%S/../../include -oTBR.out
44
// RUN: ./TBR.out | %filecheck_exec %s
5-
// XFAIL: valgrind
65

76
#include "clad/Differentiator/Differentiator.h"
87

test/Arrays/ArrayInputsReverseMode.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// RUN: ./ArrayInputsReverseMode.out | %filecheck_exec %s
33
// RUN: %cladclang %s -I%S/../../include -Wno-unused-value -oArrayInputsReverseMode.out
44
// RUN: ./ArrayInputsReverseMode.out | %filecheck_exec %s
5-
// XFAIL: valgrind
65

76
#include "clad/Differentiator/Differentiator.h"
87

test/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,16 @@ option(CLAD_CUDA_TEST_USE_SANITIZER "Run Clang cuda tests with compute-sanitizer
9090
option(CLAD_TEST_USE_VG "Run Clang tests under Valgrind" OFF)
9191
set(CLAD_TEST_EXTRA_ARGS --verbose --show-skipped --show-unsupported)
9292
if(CLAD_TEST_USE_VG)
93-
set(CLAD_TEST_EXTRA_ARGS ${CLAD_TEST_EXTRA_ARGS} "--vg --vg-arg=-q")
93+
# Run under memcheck. The only errors an LLVM 22 x86_64 build produces on
94+
# this suite are Memcheck's false "Conditional jump depends on uninitialised
95+
# value" for clang's unsigned-compare lowering of a partially-defined
96+
# bitfield word (llvm/llvm-project#194147); every one tops out in one of two
97+
# clang functions, none in a clad frame. clad-valgrind-llvm22.supp silences
98+
# exactly those two frames and nothing else, so a genuine uninitialised-value
99+
# error anywhere still fails the row. Drop the file once the running Valgrind
100+
# carries the CmpLTU/CmpLEU expensive-definedness fix.
101+
set(CLAD_TEST_EXTRA_ARGS ${CLAD_TEST_EXTRA_ARGS}
102+
"--vg --vg-arg=-q --vg-arg=--suppressions=${CMAKE_CURRENT_SOURCE_DIR}/clad-valgrind-llvm22.supp --vg-arg=--expensive-definedness-checks=yes")
94103
endif ()
95104
if(CLAD_CUDA_TEST_USE_SANITIZER)
96105
set(CLAD_TEST_EXTRA_ARGS ${CLAD_TEST_EXTRA_ARGS} "--param" "cuda_sanitizer=1")

test/ErrorEstimation/Assignments.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %cladclang -I%S/../../include -oAssignments.out %s 2>&1 | %filecheck %s
22
// RUN: ./Assignments.out | %filecheck_exec %s
3-
// XFAIL: valgrind
43

54
#include "clad/Differentiator/Differentiator.h"
65
#include "../TestUtils.h"

test/ErrorEstimation/BasicOps.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %cladclang %s -I%S/../../include -Xclang -verify -oBasicOps.out 2>&1 | %filecheck %s
22
// RUN: ./BasicOps.out | %filecheck_exec %s
3-
// XFAIL: valgrind
43

54
#include "clad/Differentiator/Differentiator.h"
65
#include "../TestUtils.h"

test/ErrorEstimation/ConditonalStatements.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %cladclang -I%S/../../include -oCondStmts.out %s 2>&1 | %filecheck %s
22
// RUN: ./CondStmts.out | %filecheck_exec %s
3-
// XFAIL: valgrind
43

54
#include "clad/Differentiator/Differentiator.h"
65
#include "../TestUtils.h"

test/ErrorEstimation/LoopsAndArrays.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %cladclang -I%S/../../include -oLoopsAndArrays.out %s 2>&1 | %filecheck %s
22
// RUN: ./LoopsAndArrays.out | %filecheck_exec %s
3-
// XFAIL: valgrind
43

54
#include "clad/Differentiator/Differentiator.h"
65
#include "../TestUtils.h"

test/ErrorEstimation/LoopsAndArraysExec.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %cladclang %s -I%S/../../include -oLoopsAndArraysExec.out 2>&1 | %filecheck %s
22
// RUN: ./LoopsAndArraysExec.out | %filecheck_exec %s
3-
// XFAIL: valgrind
43

54
#include "clad/Differentiator/Differentiator.h"
65
#include "../TestUtils.h"

0 commit comments

Comments
 (0)