From 95510959997fe189c6cf3fb8444eeb2edcd6d952 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 16 Mar 2025 17:00:39 +0300 Subject: CI: perhaps fixed address sanitizing It can be done only under ncurses, as Gtk results in many false positives. Also, try to use it on GCC and Clang. It didn't work with GCC on FreeBSD, but perhaps it will work on Ubuntu. --- .github/workflows/ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aeecd9a..9a289f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04, ubuntu-22.04] - # Enable Adress Sanitizer only on Clang. - # This will improve the test suite quality, even without Valgrind. - compiler: ['CC=gcc CXX=g++', '--disable-malloc-replacement CC=clang CXX=clang++ CFLAGS="-fsanitize=address -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=address -fno-omit-frame-pointer"'] + compiler: ['CC=gcc CXX=g++', 'CC=clang CXX=clang++'] interface: [ncurses, gtk] # NOTE: The virtual environments already contain both GCC and Clang @@ -33,10 +31,17 @@ jobs: groff doxygen - name: Configure Build + env: + # Enable Adress Sanitizer only on ncurses. + # Gtk produces a lot of false negatives. + # This will improve the test suite quality, even without Valgrind. + CFLAGS: ${{ matrix.interface == 'ncurses' && '-fsanitize=address -fno-omit-frame-pointer' }} + CXXFLAGS: ${{ matrix.interface == 'ncurses' && '-fsanitize=address -fno-omit-frame-pointer' }} + MALLOC_REPLACEMENT: ${{ matrix.interface == 'ncurses' && 'no' || 'check' }} run: | autoreconf -i ./configure --with-interface=${{ matrix.interface }} --enable-debug --enable-html-manual \ - ${{ matrix.compiler }} + --enable-malloc-replacement=$MALLOC_REPLACEMENT ${{ matrix.compiler }} # NOTE: xvfb-run emulates an XServer and is required when building # Gtk versions (since SciTECO calls itself during the build). -- cgit v1.2.3