Skip to content
Permalink
Browse files

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.
  • Loading branch information...
omira-sch committed Mar 14, 2019
1 parent f2745e1 commit 1dd0f4f6a7e5e64ad8d5c9ab200dea574b578dda
Showing with 30 additions and 1 deletion.
  1. +28 −1 .travis.yml
  2. +1 −0 Makefile.am
  3. +1 −0 lsan.supp
@@ -10,26 +10,52 @@ 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
- JPEG=/usr
- 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
@@ -15,6 +15,7 @@ EXTRA_DIST = \
vips.pc.in \
vips-cpp.pc.in \
libvips.supp \
lsan.supp \
depcomp \
README.md

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

0 comments on commit 1dd0f4f

Please sign in to comment.
You can’t perform that action at this time.