Skip to content

Commit e23148a

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

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.travis.yml

+26
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,32 @@ 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+
- EXTRAFLAGS="--disable-openssl-tests CFLAGS=-fsanitize=memory" ASM=no
79+
- BIGNUM=no EXPERIMENTAL=yes RECOVERY=yes ECDH=yes
80+
- MSAN_OPTIONS=exitcode=42
81+
- ENDOMORPHISM=yes
82+
# Memory sanitizer without endomorphism
83+
- compiler: clang
84+
env:
85+
- EXTRAFLAGS="--disable-openssl-tests CFLAGS=-fsanitize=memory" ASM=no
86+
- BIGNUM=no EXPERIMENTAL=yes RECOVERY=yes ECDH=yes
87+
- MSAN_OPTIONS=exitcode=42
88+
- ENDOMORPHISM=no
89+
6490
before_install: mkdir -p `dirname $GUAVA_JAR`
6591
install: if [ ! -f $GUAVA_JAR ]; then wget $GUAVA_URL -O $GUAVA_JAR; fi
6692
before_script: ./autogen.sh

0 commit comments

Comments
 (0)