virtme-scripts: Add LSAN_OPTION

In preparation of turning mem leak detection on in CI, this patch adds
LSAN_OPTIONS to be able to pass the suppression file.

This *does not* turn the mem leak detection on yet, as we still
need some additional mem leak fixes.

This removes fast unwind set to zero as well, as that will add a massive
runtime penalty to some of our tests, and we'll no longer need it as
we've included the entire libfontconfig as a mem leak source in the
suppression file.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2023-05-31 13:33:11 +03:00
parent 55a6216a5d
commit f043ad3647
1 changed files with 2 additions and 16 deletions

View File

@ -1,20 +1,6 @@
#!/bin/bash
# When running Debian's Xwayland and fontconfig, we hit memory leaks which
# aren't visible on other setups. We do have suppressions for these tests, but
# regrettably ASan can't see through omitted frame pointers in Expat, so for
# Xwayland specifically, we disable fast-unwind.
#
# Doing it globally makes the other tests far, far, too slow to run.
case "$1" in
*xwayland*)
export ASAN_OPTIONS="detect_leaks=0,fast_unwind_on_malloc=0"
;;
*)
export ASAN_OPTIONS="detect_leaks=0"
;;
esac
export ASAN_OPTIONS
export LSAN_OPTIONS="suppressions=../.gitlab-ci/leak-sanitizer.supp"
export ASAN_OPTIONS="detect_leaks=0"
exec "$@"