Skip to content

Commit d746fa2

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

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.travis.yml

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

0 commit comments

Comments
 (0)