From c47df433f7bc9936fc59b323ca5e53ea4a04f40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sat, 14 Oct 2023 19:12:35 +0200 Subject: [PATCH] ci: set some ASan and UBSan options This is needed in part for UBSan to make tests actually fail on encountering undefined behaviour. --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4311cef8d..0abc75725 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -343,7 +343,9 @@ build_with_asan_ubsan: - echo "Building with ASan and UBSan" - meson setup "$BUILD_DIR" --prefix="$PREFIX" -D debug=true -D optimization=g -D b_sanitize=address,undefined -D session-managers=[] - meson compile -C "$BUILD_DIR" $COMPILE_ARGS - - meson test -C "$BUILD_DIR" --no-rebuild + - env UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \ + ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 \ + meson test -C "$BUILD_DIR" --no-rebuild # A release build with NDEBUG, all options on auto() but tests explicitly # enabled. This should show issues with tests failing due to different