@samitouri / QOSamiQemu / commits / 1373470577

scripts/lsan_suppressions.txt: Add more leaks

Running "make check" with the clang leak sanitizer reveals some leak reports which are either not our problem or else not a leak which is worth our time to fix. Add some suppressions for these. While we're touching the file, add the usual SPDX header and a comment explaining how to use it. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20260302092225.4088227-3-peter.maydell@linaro.org

Peter Maydell committed Mar 6, 2026 at 09:01 UTC 1373470577396ca0b980aed937e4f4a8c90008d6
1 file changed +21
scripts/lsan_suppressions.txt
+21
@@ -1,5 +1,26 @@
1 +# SPDX-License-Identifier: GPL-2.0-or-later
2 +
3 +# This is a set of suppressions for LeakSanitizer; you can use it by setting
4 +# LSAN_OPTIONS="suppressions=/path/to/scripts/lsan_suppressions.txt"
5 +# when running a QEMU built with the leak-sanitizer.
6 +
7 # The tcmalloc on Fedora37 confuses things
8 leak:/lib64/libtcmalloc_minimal.so.4
9
10 # libxkbcommon also leaks in qemu-keymap
11 leak:/lib64/libxkbcommon.so.0
12 +
13 +# g_set_user_dirs() deliberately leaks the previous cached g_get_user_*
14 +# values. This is documented in upstream glib's valgrind-format
15 +# suppression file:
16 +# https://github.com/GNOME/glib/blob/main/tools/glib.supp
17 +# This avoids false positive leak reports for the qga-ssh-test.
18 +leak:g_set_user_dirs
19 +
20 +# qemu_irq_intercept_in is only used by the qtest harness, and
21 +# its API inherently involves a leak.
22 +# While we could keep track of the old IRQ data structure
23 +# in order to free it, it doesn't seem very important to fix
24 +# since it is only used by the qtest test harness.
25 +# Just ignore the leak, at least for the moment.
26 +leak:qemu_irq_intercept_in