add travis build with clang and address-sanitizer

Create a new build job to run fuzz regression testing in travis. Also include a
suppression file to ignore known memory leaks.
This commit is contained in:
Oscar Mira 2019-03-14 23:47:22 +01:00
parent f2745e19c9
commit 1dd0f4f6a7
3 changed files with 30 additions and 1 deletions

View File

@ -10,19 +10,22 @@ before_script:
--with-jpeg-libraries=$JPEG/lib
- make -j$JOBS -s
script:
- make -Ctest -j$JOBS -s V=0 VERBOSE=1 check
- make -j$JOBS -s -k V=0 VERBOSE=1 check
- LD_LIBRARY_PATH=$PWD/libvips/.libs
DYLD_LIBRARY_PATH=$PWD/libvips/.libs
LD_PRELOAD=$ASAN_DSO
$PYTHON -m pytest -v test/test-suite
matrix:
allow_failures:
- os: osx
- compiler: clang
fast_finish: true
include:
- os: linux
sudo: required
dist: xenial
compiler: gcc
env:
- PYTHON=python2
- PYVIPS_VERSION=master
@ -30,6 +33,29 @@ matrix:
- JOBS=`nproc`
cache: ccache
- os: linux
sudo: required
dist: xenial
compiler: clang
env:
- PYTHON=python2
- PYVIPS_VERSION=master
- JPEG=/usr
- JOBS=`nproc`
- CFLAGS="-fsanitize=address -fno-omit-frame-pointer -fopenmp"
- LDFLAGS="-fsanitize=address -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"
- FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1
install:
# add support for WebP
- wget http://archive.ubuntu.com/ubuntu/pool/main/libw/libwebp/libwebp-dev_0.6.1-2_amd64.deb
- wget http://archive.ubuntu.com/ubuntu/pool/main/libw/libwebp/libwebpdemux2_0.6.1-2_amd64.deb
- wget http://archive.ubuntu.com/ubuntu/pool/main/libw/libwebp/libwebpmux3_0.6.1-2_amd64.deb
- wget http://archive.ubuntu.com/ubuntu/pool/main/libw/libwebp/libwebp6_0.6.1-2_amd64.deb
- sudo dpkg -i *.deb
cache: ccache
- os: osx
osx_image: xcode10.1
env:
@ -79,6 +105,7 @@ addons:
- libgsf-1-dev
- libopenslide-dev
- libffi-dev
- libiomp-dev
homebrew:
packages:
- ccache

View File

@ -15,6 +15,7 @@ EXTRA_DIST = \
vips.pc.in \
vips-cpp.pc.in \
libvips.supp \
lsan.supp \
depcomp \
README.md

1
lsan.supp Normal file
View File

@ -0,0 +1 @@
leak:vips_guess_prefix