From 332193b7ec3ee0455fba57e19c78b1ad4590f83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 14 Sep 2022 15:03:59 +0300 Subject: [PATCH] run-tests: Build the ubsan test case with -fno-sanitize-recover=all This allows easier programmatic checking that the sanitizer actually caught the tested issue, when triggering the issue. --- Dockerfile.dev | 2 +- run-tests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index 4ade1b0..0b2ced5 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -146,7 +146,7 @@ RUN cd test && \ $arch-w64-mingw32-clang $test.c -o $arch/$test-asan.exe -fsanitize=address -g -gcodeview -Wl,-pdb,$arch/$test-asan.pdb || exit 1; \ done; \ for test in ubsan; do \ - $arch-w64-mingw32-clang $test.c -o $arch/$test.exe -fsanitize=undefined || exit 1; \ + $arch-w64-mingw32-clang $test.c -o $arch/$test.exe -fsanitize=undefined -fno-sanitize-recover=all || exit 1; \ done; \ done diff --git a/run-tests.sh b/run-tests.sh index 8f8a4ba..daed392 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -213,7 +213,7 @@ for arch in $ARCHS; do i686|x86_64) ;; *) continue ;; esac - $arch-w64-mingw32-clang $test.c -o $TEST_DIR/$test.exe -fsanitize=undefined + $arch-w64-mingw32-clang $test.c -o $TEST_DIR/$test.exe -fsanitize=undefined -fno-sanitize-recover=all TESTS_EXTRA="$TESTS_EXTRA $test" done for test in $TESTS_OMP; do