- CSA_CHECK=true CFLAGS_EXTRA_M=-m32
- CPPCHECK=ALL_EXCEPT_UNUSED
- CPPCHECK=UNUSED_FUNC
+ - SANITIZE=undefined CONF_M_UNMAP=--enable-munmap
+# TODO: Add testing with ASan/MSan when clang-3.8 available.
matrix:
exclude:
env: CPPCHECK=ALL_EXCEPT_UNUSED
- compiler: clang
env: CPPCHECK=UNUSED_FUNC
+ - compiler: gcc
+ env: SANITIZE=undefined CONF_M_UNMAP=--enable-munmap
+ - os: osx
+ env: SANITIZE=undefined CONF_M_UNMAP=--enable-munmap
sudo: required
CPPCHECK_ENABLE="--enable=unusedFunction";
fi;
fi
+ - if [[ "$SANITIZE" != "" ]]; then
+ CFLAGS_EXTRA="$CFLAGS_EXTRA -fsanitize=$SANITIZE -fno-common -fno-omit-frame-pointer";
+ fi
install:
- git clone --depth=50 https://github.com/ivmai/libatomic_ops.git
*.cc cord/*.c cord/tests/*.c extra/*.c extra/*.cpp
tests/*.c tests/*.cc tools/*.c;
fi
+ - if [[ "$SANITIZE" == *memory* || "$SANITIZE" == *undefined* ]]; then
+ UBSAN_OPTIONS="halt_on_error=1" make check-without-test-driver;
+ fi
after_success:
- if [[ "$CONF_GCOV" == --en* ]]; then