From 01517e75394d7679385b8d316d90e89a6f07044c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 29 Feb 2024 13:48:40 +0000 Subject: [PATCH] WIP: Enable -fsanitize=bounds in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a work in progress. Ultimately, we want to run the test suite with an `-fsanitize=bounds` build on weekly schedule. Currently, however, any build with `-fsanitize=something` fails in CI because `libubsan` is not installed in the CI image. That needs to be fixed and the CI image updated before we can use it in CI. I won’t do that now, though, as this branch can only land once next cycle opens, and that would probably result in rebuilding the CI images twice if I do it now. We may want to consider using clang for the sanitiser builds, too, partially to test building with clang, and partially because its sanitiser support is typically a little more progressed than gcc’s. Signed-off-by: Philip Withnall --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be19b6bfd..e60451052 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -174,7 +174,7 @@ fedora-x86_64: stage: build needs: [] variables: - CFLAGS: "-coverage -ftest-coverage -fprofile-arcs" + CFLAGS: "-coverage -ftest-coverage -fprofile-arcs -fsanitize=bounds" before_script: - !reference [".build-linux", "before_script"] - !reference [".with-git", "before_script"]