Travis CI: Test also with AddressSanitizer (ASan)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 16 Feb 2017 07:16:30 +0000 (10:16 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 16 Feb 2017 07:19:02 +0000 (10:19 +0300)
.travis.yml

index 3b74e6f..95526cf 100644 (file)
@@ -18,6 +18,7 @@ env:
   - CONF_GCOV=--enable-gcov
   - CSA_CHECK=true
       CPPCHECK=true
+  - SANITIZE=address
 
 matrix:
   exclude:
@@ -27,6 +28,10 @@ matrix:
     env: CONF_GCOV=--enable-gcov
   - compiler: clang
     env: CSA_CHECK=true CPPCHECK=true
+  - compiler: gcc
+    env: SANITIZE=address
+  - os: osx
+    env: SANITIZE=address
 
 sudo: required
 
@@ -44,6 +49,9 @@ before_install:
       git clone --depth=3 https://github.com/danmar/cppcheck.git -b master;
       make --directory cppcheck -j CXXFLAGS="-O3 -march=native -DNDEBUG";
     fi
+  - if [[ "$SANITIZE" != "" ]]; then
+     CFLAGS_EXTRA="$CFLAGS_EXTRA -fsanitize=$SANITIZE -fno-common -fno-omit-frame-pointer";
+    fi
 
 install:
   - ./autogen.sh