From: Emil Velikov Date: Sat, 28 Sep 2024 13:12:26 +0000 (+0100) Subject: ci: enable sanitizers in the meson build X-Git-Tag: v34~281 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42d5658f0ae7ce55b81230465aa7a01e2051071b;p=thirdparty%2Fkmod.git ci: enable sanitizers in the meson build ... to prevent a range of issues creeping in. Currently ASAN reports an ordering issue that we need to explicitly disable. Thus the sanitizers are only enabled in CI and not for all developer builds (aka build-dev.ini). Seemingly musl lacks the sanitizers, so we don't enable it on Alpine. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/160 Signed-off-by: Lucas De Marchi --- diff --git a/.github/actions/setup-fedora/action.yml b/.github/actions/setup-fedora/action.yml index 946d0fc3..0e31a58b 100644 --- a/.github/actions/setup-fedora/action.yml +++ b/.github/actions/setup-fedora/action.yml @@ -25,6 +25,11 @@ runs: openssl-devel \ git \ gtk-doc \ + libasan \ + libhwasan \ + liblsan \ + libtsan \ + libubsan \ libtool \ rsync \ scdoc diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 56080a4d..8cfae754 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,15 +25,20 @@ jobs: build: ['meson', 'autotools'] container: - name: 'ubuntu:22.04' + meson_setup: '-D b_sanitize=address,undefined' multilib: 'true' - name: 'ubuntu:24.04' + meson_setup: '-D b_sanitize=address,undefined' multilib: 'true' - name: 'archlinux:base-devel' + meson_setup: '-D b_sanitize=address,undefined' multilib: 'true' - name: 'fedora:latest' + meson_setup: '-D b_sanitize=address,undefined' - name: 'alpine:latest' meson_setup: '-D docs=false' - name: 'debian:unstable' + meson_setup: '-D b_sanitize=address,undefined' multilib: 'true' container: @@ -66,6 +71,7 @@ jobs: git config --global --add safe.directory '*' .github/print-kdir.sh >> "$GITHUB_ENV" + echo "ASAN_OPTIONS=verify_asan_link_order=0:halt_on_error=1:abort_on_error=1:print_summary=1" >> "$GITHUB_ENV" - name: configure (meson) if: ${{ matrix.build == 'meson' }}