Skip to content

Commit

Permalink
travis: Enable address sanitizer with clang
Browse files Browse the repository at this point in the history
  • Loading branch information
Daan Sprenkels committed Aug 6, 2017
1 parent b613717 commit 36b6690
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,30 @@ os:
- osx

compiler:
- clang
- gcc
- clang

env:
- USE_VALGRIND=1
- USE_ASAN=1

matrix:
exclude:
- compiler: gcc
env: USE_ASAN=1
- os: osx
env: USE_VALGRIND=1
include:
- os: osx
compiler: gcc
env: ""

addons:
apt:
packages:
- valgrind

script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export MEMCHECK="valgrind -q --leak-check=full --error-exitcode=1"; fi
- if [[ "$USE_VALGRIND" ]]; then export MEMCHECK="valgrind -q --leak-check=full --error-exitcode=1"; fi
- if [[ "$USE_ASAN" ]]; then export CFLAGS="-fsanitize=address -fno-omit-frame-pointer"; fi
- make && make check
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CFLAGS = -Wall -g -O2
CFLAGS += -Wall -g -O2
SRCS = hazmat.c randombytes.c sss.c tweetnacl.c
OBJS := ${SRCS:.c=.o}

Expand Down

0 comments on commit 36b6690

Please sign in to comment.