Skip to content

Commit 91fcfd3

Browse files
committed
workflows: test with address sanitizer to catch memory safety issues
This enables address sanitizer for CI debug builds on all distributions, which has proven useful in tracing undefined behaviour that only occurs on an arbitrary but reproducible subset of distributions. See #194 Signed-off-by: Peter Colberg <[email protected]>
1 parent 900e86e commit 91fcfd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/build-linux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ jobs:
9191

9292
- name: create build files
9393
run: |
94+
test ${{ matrix.config }} = Debug && ASAN=1
9495
cd build
95-
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_INSTALL_PREFIX=/fpga-runtime-for-opencl -DCMAKE_INSTALL_LIBDIR=lib
96+
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_INSTALL_PREFIX=/fpga-runtime-for-opencl -DCMAKE_INSTALL_LIBDIR=lib ${ASAN:+-DACL_WITH_ASAN=ON}
9697
env:
9798
CC: ${{ matrix.cross }}gcc
9899
CXX: ${{ matrix.cross }}g++

0 commit comments

Comments
 (0)