Skip to content

Commit 22a298b

Browse files
authored
CI-unixish.yml: run tests with sanitized builds (#260)
1 parent 0fe0ab6 commit 22a298b

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/CI-unixish.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,24 @@ jobs:
3535
if: matrix.os == 'ubuntu-20.04'
3636
run: |
3737
valgrind --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --error-exitcode=42 ./testrunner
38-
38+
39+
- name: Run AddressSanitizer
40+
if: matrix.os == 'ubuntu-20.04'
41+
run: |
42+
make clean
43+
make -j$(nproc) test CXX=${{ matrix.compiler }} CXXFLAGS="-O2 -g3 -fsanitize=address" LDFLAGS="-fsanitize=address"
44+
env:
45+
ASAN_OPTIONS: detect_stack_use_after_return=1
46+
47+
- name: Run UndefinedBehaviorSanitizer
48+
if: matrix.os == 'ubuntu-20.04'
49+
run: |
50+
make clean
51+
make -j$(nproc) test CXX=${{ matrix.compiler }} CXXFLAGS="-O2 -g3 -fsanitize=undefined -fno-sanitize=signed-integer-overflow" LDFLAGS="-fsanitize=undefined -fno-sanitize=signed-integer-overflow"
52+
53+
# TODO: enable when false positives are fixed
54+
- name: Run MemorySanitizer
55+
if: false && matrix.os == 'ubuntu-20.04' && matrix.compiler == 'clang++'
56+
run: |
57+
make clean
58+
make -j$(nproc) test CXX=${{ matrix.compiler }} CXXFLAGS="-O2 -g3 -stdlib=libc++ -fsanitize=memory" LDFLAGS="-lc++ -fsanitize=memory"

0 commit comments

Comments
 (0)