[glib: 1/3] glib.supp: Ignore gutils leaks for user and system dirs




commit 505755e4d2e7ea57adcad3a7daf45c50b745e264
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Sep 14 21:50:38 2022 +0200

    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

 tools/glib.supp | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 121 insertions(+), 1 deletion(-)
---
diff --git a/tools/glib.supp b/tools/glib.supp
index b06efec0d5..0609db44e6 100644
--- a/tools/glib.supp
+++ b/tools/glib.supp
@@ -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
-}
\ No newline at end of file
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]