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>
--- /dev/null
+{
+ ignore-leaked-dlopen-handles
+ Memcheck:Leak
+ ...
+ fun:dlopen@@GLIBC_2.34
+}
+
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',