Skip to content

Commit ac3801a

Browse files
committed
[CI] Run the LLVM 22 Valgrind row against the from-source recipe
The Valgrind memcheck row ran against apt.llvm.org's clang-22, whose -O2 x86_64 binaries read uninitialised bitfield padding across AST/Sema/CodeGen (llvm/llvm-project#194147) -- ~399 distinct clang/LLVM read sites, none in a clad frame, tripping --error-exitcode on nearly the whole suite. The from-source llvm-release recipe (Release+Asserts) had never been exercised by this row: the matrix defaulted every Linux row to flavor=system (apt) via `matrix.flavor || 'system'`, which cannot emit the empty flavor the recipe needs. Route the row through the recipe (use-recipe selects setup-llvm's empty flavor) and run memcheck with no suppression file plus --gen-suppressions=all, so the recipe build's raw behaviour is visible: a clean row means it is valgrind-clean and no suppressions are needed, a failing one hands us the exact frames to triage. Drop the ~47 noise-driven `XFAIL: valgrind` markers accordingly; NumDiff.C keeps its timeout marker and the i586 Pointers.C XFAIL stays.
1 parent 9f2e636 commit ac3801a

49 files changed

Lines changed: 20 additions & 53 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: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,16 @@ 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'
110+
# Run Valgrind against the from-source llvm-release recipe
111+
# (Release+Asserts) rather than apt, to measure whether the
112+
# apt binaries' -O2 uninitialised-read noise is present there.
113+
use-recipe: 'true'
110114

111115
- name: ubu24-arm-clang16-runtime17-shared-libs
112116
os: ubuntu-24.04-arm
@@ -186,13 +190,16 @@ jobs:
186190
fi
187191
fi
188192
echo "ncpus=$ncpus" >> $GITHUB_ENV
189-
- name: Setup LLVM ${{ matrix.clang-runtime }}${{ matrix.flavor && format(' [{0}]', matrix.flavor) || '' }}
193+
- name: Setup LLVM ${{ matrix.clang-runtime }}${{ matrix.use-recipe == 'true' && ' [recipe]' || (matrix.flavor && format(' [{0}]', matrix.flavor) || '') }}
190194
if: runner.os != 'Windows'
191195
uses: compiler-research/ci-workflows/actions/setup-llvm@main
192196
with:
193197
version: ${{ matrix.clang-runtime }}
194198
os: ${{ matrix.self-hosted-os || matrix.os }}
195-
flavor: ${{ matrix.flavor || 'system' }}
199+
# use-recipe=true selects setup-llvm's empty flavor (the vanilla
200+
# from-source llvm-release recipe); the `|| 'system'` default can't
201+
# emit that empty string on its own.
202+
flavor: ${{ matrix.use-recipe != 'true' && (matrix.flavor || 'system') || '' }}
196203

197204
- name: Install extra Linux deps
198205
if: runner.os == 'Linux'

test/Analyses/ActivityReverse.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
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
55
//CHECK-NOT: {{.*error|warning|note:.*}}
6-
// XFAIL: valgrind
76

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

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: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ 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 with no suppression file, so the LLVM build under
94+
# test shows its raw uninitialised-read behaviour: a clean row means the
95+
# build is valgrind-clean, a failing one is triaged from the log.
96+
# --gen-suppressions=all prints a ready-to-reuse stanza for every error,
97+
# keyed on the exact frames, should any turn out to need suppressing.
98+
set(CLAD_TEST_EXTRA_ARGS ${CLAD_TEST_EXTRA_ARGS}
99+
"--vg --vg-arg=-q --vg-arg=--gen-suppressions=all")
94100
endif ()
95101
if(CLAD_CUDA_TEST_USE_SANITIZER)
96102
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)