Skip to content

Commit 72e929a

Browse files
committed
CI: Run backend unit tests under valgrind
Add unit_valgrind job to ci.yml that runs the unit tests under valgrind on x86_64 and aarch64 runners. This catches buffer overflows in hand-written assembly that ASan cannot detect, since ASan only instruments compiler-generated code. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent 056477a commit 72e929a

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,43 @@ jobs:
462462
examples: false
463463
stack: true
464464
check_namespace: false
465+
unit_valgrind:
466+
name: Unit tests + valgrind (${{ matrix.target.name }}, ${{ matrix.cflags }})
467+
strategy:
468+
fail-fast: false
469+
matrix:
470+
external:
471+
- ${{ github.repository_owner != 'pq-code-package' }}
472+
target:
473+
- runner: ubuntu-latest
474+
name: x86_64
475+
- runner: ubuntu-24.04-arm
476+
name: aarch64
477+
cflags: ['-O3', '-Os']
478+
exclude:
479+
- external: true
480+
runs-on: ${{ matrix.target.runner }}
481+
steps:
482+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
483+
- name: Unit tests under valgrind
484+
uses: ./.github/actions/functest
485+
with:
486+
gh_token: ${{ secrets.GITHUB_TOKEN }}
487+
nix-shell: valgrind-varlat_gcc15
488+
nix-cache: false
489+
opt: opt
490+
cflags: "${{ matrix.cflags }}"
491+
func: false
492+
kat: false
493+
acvp: false
494+
wycheproof: false
495+
examples: false
496+
stack: false
497+
unit: true
498+
alloc: false
499+
rng_fail: false
500+
check_namespace: false
501+
exec_wrapper: "valgrind --error-exitcode=1"
465502
config_variations:
466503
name: Non-standard configurations
467504
strategy:

0 commit comments

Comments
 (0)