add UBSAN sanitizer

This commit is contained in:
Oscar Mira 2019-08-02 12:23:39 +02:00
parent cf655c6fbe
commit 78c0014708
2 changed files with 3 additions and 2 deletions

View File

@ -41,8 +41,8 @@ matrix:
- PYVIPS_VERSION=master
- JPEG=/usr
- JOBS=`nproc`
- CFLAGS="-fsanitize=address -fno-omit-frame-pointer -fopenmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
- LDFLAGS="-fsanitize=address -dynamic-asan -fopenmp=libiomp5"
- CFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -fopenmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
- LDFLAGS="-fsanitize=address,undefined -dynamic-asan -fopenmp=libiomp5"
- ASAN_DSO=/usr/local/clang-7.0.0/lib/clang/7.0.0/lib/linux/libclang_rt.asan-x86_64.so
- LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/lsan.supp"
install:

View File

@ -6,6 +6,7 @@ set -e
# Glib is build without -fno-omit-frame-pointer. We need
# to disable the fast unwinder to get full stacktraces.
export ASAN_OPTIONS="fast_unwind_on_malloc=0:allocator_may_return_null=1"
export UBSAN_OPTIONS="print_stacktrace=1"
# Hide all warning messages from vips.
export VIPS_WARNING=0