Skip to content

Commit f3cae6b

Browse files
committed
Add a clang memory sanitizer test to travis
1 parent 0c774d8 commit f3cae6b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.travis.yml

+28
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,34 @@ matrix:
6161
packages:
6262
- gcc-multilib
6363
- libgmp-dev:i386
64+
65+
# clang with memory sanitizer
66+
#
67+
# --disable-openssl-tests because openssl uses uninitialized memory. ASM
68+
# and BIGNUM are disabled because clang memory sanitizer does not work
69+
# with inline assembly (https://clang.llvm.org/docs/MemorySanitizer.html).
70+
# The memory sanitizer is instructed to exit with a different exit code
71+
# using MSAN_OPTIONS. This is because the default exit code is 77 - the
72+
# same exit code that autotools make check interprets as a test that is
73+
# supposed to be skipped.
74+
#
75+
# With endomorphism
76+
- compiler: clang
77+
env:
78+
- CFLAGS="-fsanitize=memory -fno-omit-frame-pointer -g"
79+
- ASM=no BIGNUM=no EXTRAFLAGS="--disable-openssl-tests"
80+
- EXPERIMENTAL=yes RECOVERY=yes ECDH=yes
81+
- MSAN_OPTIONS=exitcode=42
82+
- ENDOMORPHISM=yes
83+
# Memory sanitizer without endomorphism
84+
- compiler: clang
85+
env:
86+
- CFLAGS="-fsanitize=memory -fno-omit-frame-pointer -g"
87+
- ASM=no BIGNUM=no EXTRAFLAGS="--disable-openssl-tests"
88+
- EXPERIMENTAL=yes RECOVERY=yes ECDH=yes
89+
- MSAN_OPTIONS=exitcode=42
90+
- ENDOMORPHISM=no
91+
6492
before_install: mkdir -p `dirname $GUAVA_JAR`
6593
install: if [ ! -f $GUAVA_JAR ]; then wget $GUAVA_URL -O $GUAVA_JAR; fi
6694
before_script: ./autogen.sh

0 commit comments

Comments
 (0)