WIP: Enable -fsanitize=bounds in CI

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 <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-02-29 13:48:40 +00:00
parent 71aeb3de5a
commit 01517e7539

View File

@ -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"]