Merge pull request #2484 from bluca/address_sanitizer

Problem: lack of out-of-bound memory checks in tests
This commit is contained in:
Doron Somech 2017-03-30 20:26:17 +03:00 committed by GitHub
commit f1bbb6fc0a
2 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,8 @@ matrix:
- xmlto
- env: BUILD_TYPE=default CURVE=libsodium
os: osx
- env: BUILD_TYPE=default CURVE=tweetnacl DRAFT=enabled ADDRESS_SANITIZER=enabled
os: linux
sudo: required

View File

@ -15,6 +15,11 @@ if [ $BUILD_TYPE == "default" ]; then
CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig")
CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}")
if [ -n "$ADDRESS_SANITIZER" ] && [ "$ADDRESS_SANITIZER" == "enabled" ]; then
CONFIG_OPTS+=("CFLAGS=-fsanitize=address")
CONFIG_OPTS+=("CXXFLAGS=-fsanitize=address")
fi
if [ -z $CURVE ]; then
CONFIG_OPTS+=("--disable-curve")
elif [ $CURVE == "libsodium" ]; then