Skip to content

Commit 5b22550

Browse files
committed
Additional memory checks on travis (currently with prevented fail)
1 parent 89c6b10 commit 5b22550

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

.travis.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ install:
5555
- if [ "$CROSS_COMPILE" = "1" ] && [ "$ARM_ARCH_DIR" = "aarch64-linux-gnu" ]; then sed -i 's+/usr/bin/ld+$HOME/linker_bin/ld+g' Makefile; fi
5656
- make
5757
- make check TESTS=
58+
before_script:
59+
- if [ "$BUILD_TYPE" = "asan" ]; then export CFLAGS='-fsanitize=address'; export LDFLAGS='-fsanitize=address'; fi
60+
- if [ "$BUILD_TYPE" = "asanpc" ]; then export CFLAGS='-fsanitize=address -fsanitize=pointer-compare'; export LDFLAGS='-fsanitize=address -fsanitize=pointer-compare'; fi
61+
- if [ "$BUILD_TYPE" = "asanps" ]; then export CFLAGS='-fsanitize=address -fsanitize=pointer-subtract'; export LDFLAGS='-fsanitize=address -fsanitize=pointer-subtract'; fi
62+
- if [ "$BUILD_TYPE" = "lsan" ]; then export CFLAGS='-fsanitize=leak'; export LDFLAGS='-fsanitize=leak'; fi
63+
- if [ "$BUILD_TYPE" = "tsan" ]; then export CFLAGS='-fsanitize=thread'; export LDFLAGS='-fsanitize=thread'; fi
64+
- if [ "$BUILD_TYPE" = "ubsan" ]; then export export CFLAGS='-fsanitize=undefined'; export LDFLAGS='-fsanitize=undefined'; fi
5865
script:
5966
- if [[ "$CROSS_COMPILE" == 1 ]]; then
6067
cd test ;
@@ -100,6 +107,54 @@ matrix:
100107
- g++-5
101108
env:
102109
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
110+
- os: linux
111+
compiler: gcc
112+
addons:
113+
apt:
114+
sources:
115+
- ubuntu-toolchain-r-test
116+
env:
117+
- BUILD_TYPE=asan
118+
- os: linux
119+
compiler: gcc
120+
addons:
121+
apt:
122+
sources:
123+
- ubuntu-toolchain-r-test
124+
env:
125+
- BUILD_TYPE=asanpc
126+
- os: linux
127+
compiler: gcc
128+
addons:
129+
apt:
130+
sources:
131+
- ubuntu-toolchain-r-test
132+
env:
133+
- BUILD_TYPE=asanps
134+
- os: linux
135+
compiler: gcc
136+
addons:
137+
apt:
138+
sources:
139+
- ubuntu-toolchain-r-test
140+
env:
141+
- BUILD_TYPE=lsan
142+
- os: linux
143+
compiler: gcc
144+
addons:
145+
apt:
146+
sources:
147+
- ubuntu-toolchain-r-test
148+
env:
149+
- BUILD_TYPE=tsan
150+
- os: linux
151+
compiler: gcc
152+
addons:
153+
apt:
154+
sources:
155+
- ubuntu-toolchain-r-test
156+
env:
157+
- BUILD_TYPE=ubsan
103158
- os: linux
104159
addons:
105160
apt:
@@ -229,3 +284,9 @@ matrix:
229284
allow_failures:
230285
- env: MATRIX_EVAL="CROSS_COMPILE=1 && ARM_ARCH_DIR=arm-linux-gnueabi && CC=arm-linux-gnueabi-gcc"
231286
- env: MATRIX_EVAL="CROSS_COMPILE=1 && ARM_LD_PATH=$HOME/linker_bin && ARM_ARCH_DIR=aarch64-linux-gnu"
287+
- env: BUILD_TYPE=asan
288+
- env: BUILD_TYPE=asanpc
289+
- env: BUILD_TYPE=asanps
290+
- env: BUILD_TYPE=lsan
291+
- env: BUILD_TYPE=tsan
292+
- env: BUILD_TYPE=ubsan

0 commit comments

Comments
 (0)