From: Emil Velikov Date: Sun, 8 Feb 2026 16:04:38 +0000 (+0000) Subject: Add and install valgrind suppression file X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21acc57c72777b05bc46b3552fdfb14614453e9f;p=thirdparty%2Fkmod.git Add and install valgrind suppression file We're leaking some dlopen handles, by design. It is cleaned up when the process is closed and there is no reason to be concerned/alarmed. To indicate that, let's ship a valgrind suppression file. Admittedly these are not 100% enough since depending on the c runtime and/or version it can leak some global state, which gets caught. The newer the glibc version, the more likely it is to exbibit such behaviour. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/420 Signed-off-by: Lucas De Marchi --- diff --git a/libkmod/valgrind/kmod.supp b/libkmod/valgrind/kmod.supp new file mode 100644 index 00000000..54b81b8a --- /dev/null +++ b/libkmod/valgrind/kmod.supp @@ -0,0 +1,7 @@ +{ + ignore-leaked-dlopen-handles + Memcheck:Leak + ... + fun:dlopen@@GLIBC_2.34 +} + diff --git a/meson.build b/meson.build index c2bf5adf..d702a98c 100644 --- a/meson.build +++ b/meson.build @@ -407,6 +407,11 @@ pkg.generate( libraries_private : cdeps, ) +install_data( + files('libkmod/valgrind/kmod.supp'), + install_dir : datadir / 'kmod/valgrind' +) + if get_option('tools') libkmod_internal = static_library( 'kmod-internal',