summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2016-10-31 09:57:21 +0100
committerDaiki Ueno <ueno@gnu.org>2016-10-31 15:36:10 +0100
commitde5f2e5c59a8811aaea0c19a4a8899e370413851 (patch)
tree6e8a4b38ba1e40e4aafda327f85908c659c404b4
parent09f584cbef43cac2a071b54f0fc97dd318fe88ea (diff)
travis: Enable GCC sanitizers
-rw-r--r--.travis.yml8
1 files changed, 7 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 37a881e..7d9f3b9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,11 @@ sudo: required
language: c
+env:
+ - BUILD_OPTS=
+ - BUILD_OPTS="CFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread'
+ - BUILD_OPTS="CFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread'
+
services:
- docker
@@ -11,6 +16,7 @@ before_install:
- docker exec $CONTAINER dnf -y install 'dnf-command(builddep)'
- docker exec $CONTAINER dnf -y builddep p11-kit
- docker exec $CONTAINER dnf -y install gettext-devel libtool make
+ - docker exec $CONTAINER dnf -y install libasan libubsan
- docker exec $CONTAINER useradd user
- docker exec $CONTAINER mkdir /builddir
- docker exec $CONTAINER chown -R user /builddir
@@ -23,5 +29,5 @@ install:
script:
- docker exec $CONTAINER sh -c "cd /srcdir && NOCONFIGURE=1 ./autogen.sh"
- - docker exec $CONTAINER su - user sh -c "cd /builddir && ../srcdir/configure --prefix=/usr --libdir=/usr/lib64"
+ - docker exec $CONTAINER su - user sh -c "cd /builddir && ../srcdir/configure --prefix=/usr --libdir=/usr/lib64 CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" LDFLAGS=\"$LDFLAGS\" LIBS=\"$LIBS\""
- docker exec $CONTAINER su - user sh -c "cd /builddir && make V=1 && make check V=1"