From: Nathan Moinvaziri Date: Thu, 17 Mar 2022 19:22:22 +0000 (-0700) Subject: Added sanitizer tests in configure GitHub Actions workflow. X-Git-Tag: 2.1.0-beta1~323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7db850aa08791532af535ac896bb0ee13b415b62;p=thirdparty%2Fzlib-ng.git Added sanitizer tests in configure GitHub Actions workflow. Added missing OPTIONS environment variable for UBSAN in CMake GitHub workflow. --- diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 13c1933f1..2bf834a70 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -41,21 +41,20 @@ jobs: cmake-args: -DZLIB_COMPAT=ON -DZLIB_SYMBOL_PREFIX=zTest_ codecov: ubuntu_gcc_compat_sprefix - - name: Ubuntu GCC OSB -O1 UBSAN + - name: Ubuntu GCC -O1 OSB os: ubuntu-latest compiler: gcc cxx-compiler: g++ - cmake-args: -DWITH_SANITIZER=Undefined build-dir: ../build build-src-dir: ../zlib-ng codecov: ubuntu_gcc_osb cflags: -O1 -g3 - - name: Ubuntu GCC -O3 No Unaligned + - name: Ubuntu GCC -O3 No Unaligned UBSAN os: ubuntu-latest compiler: gcc cxx-compiler: g++ - cmake-args: -DWITH_UNALIGNED=OFF + cmake-args: -DWITH_UNALIGNED=OFF -DWITH_SANITIZER=Undefined codecov: ubuntu_gcc_o3 cflags: -O3 @@ -493,6 +492,7 @@ jobs: MSAN_OPTIONS: ${{ matrix.msan-options || 'verbosity=0' }}:abort_on_error=1 TSAN_OPTIONS: ${{ matrix.tsan-options || 'verbosity=0' }}:abort_on_error=1 LSAN_OPTIONS: ${{ matrix.lsan-options || 'verbosity=0' }}:abort_on_error=1 + UBSAN_OPTIONS: ${{ matrix.ubsan-options || 'verbosity=0' }}:print_stacktrace=1:abort_on_error=1 - name: Generate coverage report if: matrix.codecov diff --git a/.github/workflows/configure.yml b/.github/workflows/configure.yml index 2c72afb8a..2ab9d0e52 100644 --- a/.github/workflows/configure.yml +++ b/.github/workflows/configure.yml @@ -30,6 +30,21 @@ jobs: compiler: gcc configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies + - name: Ubuntu GCC ASAN + os: ubuntu-latest + compiler: gcc + configure-args: --warn --with-sanitizer=address + + - name: Ubuntu GCC MSAN + os: ubuntu-latest + compiler: gcc + configure-args: --warn --with-sanitizer=memory + + - name: Ubuntu GCC No Unaligned UBSAN + os: ubuntu-latest + compiler: gcc + configure-args: --warn --without-unaligned --with-sanitizer=undefined + - name: Ubuntu GCC ARM SF os: ubuntu-latest compiler: arm-linux-gnueabi-gcc @@ -224,6 +239,9 @@ jobs: make test env: QEMU_RUN: ${{ matrix.qemu-run }} + ASAN_OPTIONS: abort_on_error=1 + MSAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: print_stacktrace=1:abort_on_error=1 - name: Upload build errors uses: actions/upload-artifact@v2