Commit d3ca2350 authored by Luca Boccassi's avatar Luca Boccassi

Problem: lack of out-of-bound memory checks in tests

Solution: add a CI build run with GCC's Address Sanitizer enabled.
This compiler flag will make the unit test programs abort if it
detects errors such as out-of-bound memory access or use-after-free.
parent 7ce68da2
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment