improved sanitizer builds in CI (#2928)

This commit is contained in:
Oliver Stöneberg 2020-12-01 18:02:13 +01:00 committed by GitHub
parent 2bbc7abedc
commit 9c20b29dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 12 deletions

View File

@ -20,20 +20,19 @@ jobs:
- name: Install missing software on ubuntu
run: |
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install z3 libz3-dev
sudo apt-get install libz3-4 libz3-dev
cp externals/z3_version_old.h externals/z3_version.h
- name: Build
run: |
cp externals/z3_version_old.h externals/z3_version.h
CXXFLAGS="-fsanitize=address -Og -g3" make cppcheck testrunner -j$(nproc) USE_Z3=yes
CC=clang CXX=clang++ CXXFLAGS="-fsanitize=address -O1 -g3 -DCPPCHK_GLIBCXX_DEBUG" make cppcheck testrunner -j$(nproc) USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes
- name: Run tests
run: |
./testrunner
ASAN_OPTIONS=detect_stack_use_after_return=1 ./testrunner
- name: Bughunting lib
run: |
./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib
ASAN_OPTIONS=detect_stack_use_after_return=1 ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib

View File

@ -20,20 +20,19 @@ jobs:
- name: Install missing software on ubuntu
run: |
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install z3 libz3-dev
sudo apt-get install libz3-4 libz3-dev
cp externals/z3_version_old.h externals/z3_version.h
- name: Build
run: |
cp externals/z3_version_old.h externals/z3_version.h
CXXFLAGS="-fsanitize=undefined -Og -g3" make cppcheck testrunner -j$(nproc) USE_Z3=yes
CC=clang CXX=clang++ CXXFLAGS="-fsanitize=undefined -fsanitize=nullability -O1 -g3 -DCPPCHK_GLIBCXX_DEBUG" make cppcheck testrunner -j$(nproc) USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes
- name: Run tests
run: |
./testrunner
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 ./testrunner
- name: checkcfg
- name: Bughunting lib
run: |
make checkcfg
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib

View File

@ -12,7 +12,7 @@ env:
- CXXFLAGS="${ORIGINAL_CXXFLAGS} -O2 -march=native -Wstrict-aliasing=2 -Werror=strict-aliasing"
- CPPCHECK=${TRAVIS_BUILD_DIR}/cppcheck
- ASAN_OPTIONS=detect_stack_use_after_return=1
- UBSAN_OPTIONS=print_stacktrace=1
- UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1
matrix:
- CXXFLAGS="${CXXFLAGS} -DCHECK_INTERNAL"
- CXXFLAGS="${CXXFLAGS} -DCHECK_INTERNAL" MAKEFLAGS="HAVE_RULES=yes" MATCHCOMPILER=yes VERIFY=1