glib.supp: Ignore gutils leaks for user and system dirs

These leaks happens "by design" in case that the private API
g_set_user_dirs() is used to replace directories during some tests.
And we've to leak the previously set values (if any) not to free strings
that may be used by other user code before.

In fact we're already ignoring LSAN reports for the very same reason
here.

We could create a private suppression file too, but I don't think we've to
bother with that, given that user code should never hit this path
anyways.

It's the only leak we have, sooo:

Fixes: https://gitlab.gnome.org/GNOME/glib/-/issues/333
This commit is contained in:
Marco Trevisan (Treviño) 2022-09-14 21:50:38 +02:00
parent a20a36b26f
commit 505755e4d2

View File

@ -904,6 +904,126 @@
fun:desktop_file_dir_unindexed_setup_search
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_user_data_dir
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_user_data_dir
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_filename
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_filename
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_home_dir
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_home_dir
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_path
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_path
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_system_config_dirs
Memcheck:Leak
match-leak-kinds:definite
fun:realloc
...
fun:g_build_system_config_dirs
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_system_data_dir
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_system_data_dir
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_system_data_dirs
Memcheck:Leak
match-leak-kinds:definite
fun:realloc
...
fun:g_build_system_data_dirs
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_user_cache_dir
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_user_cache_dir
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_user_config_dir
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_user_config_dir
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_user_data_dir
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_user_data_dir
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_user_runtime_dir
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_user_runtime_dir
}
#gutils.c caches system and user dirs and may need to replace them during tests.
{
g_build_user_state_dir
Memcheck:Leak
match-leak-kinds:definite
fun:malloc
...
fun:g_build_user_state_dir
}
# g_io_extension_point_register() caches a one-time allocation global table of @extension_points.
{
g_io_extension_point_register
@ -1124,4 +1244,4 @@
fun:calloc
...
fun:xdg_mime_init
}
}