]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
Add and install valgrind suppression file
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 8 Feb 2026 16:04:38 +0000 (16:04 +0000)
committerLucas De Marchi <demarchi@kernel.org>
Thu, 7 May 2026 05:57:56 +0000 (00:57 -0500)
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 <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/420
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
libkmod/valgrind/kmod.supp [new file with mode: 0644]
meson.build

diff --git a/libkmod/valgrind/kmod.supp b/libkmod/valgrind/kmod.supp
new file mode 100644 (file)
index 0000000..54b81b8
--- /dev/null
@@ -0,0 +1,7 @@
+{
+   ignore-leaked-dlopen-handles
+   Memcheck:Leak
+   ...
+   fun:dlopen@@GLIBC_2.34
+}
+
index c2bf5adf0b7f4caa1e03ade4658f215fb732b6e4..d702a98cee0bee718e848a4e3ccaaaf3d4f297d4 100644 (file)
@@ -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',