Skip to content

Commit

Permalink
travis: build with sanitize=address,undefined,signed-integer-overflow
Browse files Browse the repository at this point in the history
... using clang

Closes curl#3190
  • Loading branch information
bagder authored and xquery committed Nov 1, 2018
1 parent faec182 commit 9295a6b
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cache:
- $HOME/libidn2-2.0.4
- $HOME/wolfssl-3.14.0-stable
- $HOME/mesalink-0.7.1
- $HOME/nghttp2-1.34.0

env:
global:
Expand Down Expand Up @@ -142,17 +143,16 @@ matrix:
compiler: clang
dist: trusty
env: T=tidy
- os: linux
compiler: clang
dist: trusty
env: T=debug CFLAGS="-fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g" LDFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer" LIBS="-ldl -lubsan"

install:
- if [ "$T" = "coverage" ]; then pip2 install --user cpp-coveralls; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update > /dev/null; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew reinstall libtool > /dev/null; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install rtmpdump libssh2 c-ares libmetalink libressl nghttp2 libmetalink; fi
- if [ $TRAVIS_OS_NAME = linux ]; then
curl -L https://github.com/nghttp2/nghttp2/releases/download/v1.24.0/nghttp2-1.24.0.tar.gz |
tar xzf - &&
(cd nghttp2-1.24.0 && CXX="g++-8" ./configure --prefix=/usr --disable-threads --enable-app && make && sudo make install);
fi

before_script:
- ./buildconf
Expand Down Expand Up @@ -248,13 +248,25 @@ before_script:
make)
fi
fi
- |
if [ $TRAVIS_OS_NAME = linux ]; then
if [ ! -e $HOME/nghttp2-1.34.0/Makefile ]; then
(cd $HOME && \
curl -L https://github.com/nghttp2/nghttp2/releases/download/v1.34.0/nghttp2-1.34.0.tar.gz |
tar xzf - && \
cd nghttp2-1.34.0 && \
CXX="g++-8" CC="gcc-8" CFLAGS="" LDFLAGS="" LIBS="" ./configure --disable-threads --enable-app && \
make)
fi
fi
- |
if [ $TRAVIS_OS_NAME = linux ]; then
(cd $HOME/libidn2-2.0.4 && sudo make install)
(cd $HOME/libpsl-0.20.1 && sudo make install)
(cd $HOME/mbedtls-mbedtls-2.8.0 && sudo make install)
(cd $HOME/wolfssl-3.14.0-stable && sudo make install)
(cd $HOME/mesalink-0.7.1 && sudo make install)
(cd $HOME/nghttp2-1.34.0 && sudo make install)
fi
script:
Expand Down

0 comments on commit 9295a6b

Please sign in to comment.