1 # GLib Valgrind suppressions file
3 # This provides a list of suppressions for all of GLib (including GIO), for all
4 # Valgrind tools (memcheck, drd, helgrind, etc.) for the false positives and
5 # deliberate one-time leaks which GLib causes to be reported when running under
8 # When running an application which links to GLib under Valgrind, you can pass
9 # this suppression file to Valgrind using --suppressions=/path/to/glib-2.0.supp.
11 # http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress
13 # Note that there is currently no way for Valgrind to load this automatically
14 # (https://bugs.kde.org/show_bug.cgi?id=160905), so the best GLib can currently
15 # do is to install this file as part of its development package.
17 # This file should be updated if GLib introduces a new deliberate one-time leak,
18 # or another false race positive in Valgrind: please file bugs at:
20 # https://gitlab.gnome.org/GNOME/glib/issues/new
25 match-leak-kinds:reachable
34 match-leak-kinds:reachable
41 g-tls-backend-gnutls-init
43 match-leak-kinds:reachable
45 fun:g_tls_backend_gnutls_init
51 match-leak-kinds:reachable
54 fun:create_tokens_inlock
55 fun:initialize_module_inlock_reentrant
58 # One-time allocation from libc for getpwnam() results
62 match-leak-kinds:reachable
66 fun:g_local_vfs_parse_name
72 match-leak-kinds:reachable
81 match-leak-kinds:reachable
90 match-leak-kinds:reachable
99 match-leak-kinds:reachable
108 match-leak-kinds:possible,reachable
115 g-type-register-dynamic
117 match-leak-kinds:reachable
120 fun:g_type_register_dynamic
124 g-type-register-static
126 match-leak-kinds:possible,reachable
129 fun:g_type_register_static
133 g-type-register-static-realloc
135 match-leak-kinds:possible,reachable
138 fun:g_type_register_static
142 g-type-register-static-calloc
144 match-leak-kinds:possible,reachable
147 fun:g_type_register_static
151 g-type-register-fundamental
153 match-leak-kinds:possible,reachable
156 fun:g_type_register_fundamental
160 g-type-register-fundamental-calloc
162 match-leak-kinds:possible,reachable
165 fun:g_type_register_fundamental
169 g-type-add-interface-dynamic
171 match-leak-kinds:reachable
174 fun:g_type_add_interface_dynamic
178 g-type-add-interface-static
180 match-leak-kinds:reachable
183 fun:g_type_add_interface_static
187 g-type-add-interface-static-realloc
189 match-leak-kinds:reachable
192 fun:g_type_add_interface_static
196 g-type-add-interface-static-calloc
198 match-leak-kinds:reachable
201 fun:g_type_add_interface_static
207 match-leak-kinds:reachable
210 fun:g_rand_new_with_seed_array
219 match-leak-kinds:reachable
222 fun:g_rand_new_with_seed_array
224 fun:get_global_random
230 match-leak-kinds:reachable
239 match-leak-kinds:reachable
241 fun:g_hash_table_resize
247 g-type-interface-init
249 match-leak-kinds:reachable
252 fun:type_iface_vtable_base_init_Wm
256 g-type-class-init-calloc
258 match-leak-kinds:reachable
261 fun:type_class_init_Wm
267 match-leak-kinds:reachable
268 fun:g_type_create_instance
270 fun:type_class_init_Wm
274 g-object-do-class-init-signals
276 match-leak-kinds:reachable
280 fun:type_class_init_Wm
286 match-leak-kinds:reachable
289 fun:type_iface_add_prerequisite_W
293 g-type-add-interface-check
295 match-leak-kinds:reachable
298 fun:g_type_add_interface_check
300 fun:type_class_init_Wm
304 g-type-add-interface-check-realloc
306 match-leak-kinds:reachable
309 fun:g_type_add_interface_check
311 fun:type_class_init_Wm
315 g-object-class-install-property
317 match-leak-kinds:reachable
320 fun:validate_and_install_class_property
322 fun:type_class_init_Wm
326 g-param-spec-pool-new
328 match-leak-kinds:reachable
331 fun:g_param_spec_pool_new
333 fun:type_class_init_Wm
336 # weak_locations_lock in gobject.c
340 match-leak-kinds:reachable
343 fun:g_rw_lock_get_impl
349 g-object-base-class-init-construct-pproperties
351 match-leak-kinds:reachable
355 fun:g_object_base_class_init
356 fun:type_class_init_Wm
364 fun:type_class_init_Wm
370 g-type-class-ref-inlined
374 fun:UnknownInlinedFun
380 g-io-module-default-singleton-malloc
382 match-leak-kinds:reachable
385 fun:g_type_create_instance
387 fun:_g_io_module_get_default
391 g-io-module-default-singleton-calloc
393 match-leak-kinds:reachable
396 fun:g_type_create_instance
398 fun:_g_io_module_get_default
401 # This one seems to show up sometimes with g_type_create_instance() at the top
402 # of the stack, as well.
404 g-io-module-default-singleton
406 match-leak-kinds:reachable
407 fun:g_type_create_instance
409 fun:_g_io_module_get_default
413 g-io-module-default-singleton-module
415 match-leak-kinds:reachable
420 fun:_g_io_module_get_default
424 g-io-module-default-singleton-name
426 match-leak-kinds:reachable
431 fun:_g_io_module_get_default*
435 g-io-module-default-singleton-weak-ref
439 fun:_g_io_module_get_default
443 g-get-language-names-malloc
445 match-leak-kinds:reachable
448 fun:g_get_language_names
452 g-get-language-names-calloc
454 match-leak-kinds:reachable
457 fun:g_get_language_names
461 g-get-language_names-with-category-malloc
463 match-leak-kinds:possible,reachable,definite
466 fun:g_get_language_names_with_category
470 g-get-language_names-with-category-calloc
472 match-leak-kinds:possible,reachable,definite
475 fun:g_get_language_names_with_category
479 g-get-language_names-with-category-realloc
481 match-leak-kinds:possible,reachable,definite
484 fun:g_get_language_names_with_category
490 match-leak-kinds:reachable
493 fun:g_static_mutex_get_mutex_impl
499 match-leak-kinds:possible,reachable
502 fun:g_system_thread_new
506 g-system-thread-init-malloc
508 match-leak-kinds:possible,reachable,definite
511 fun:g_system_thread_new
515 g-task-thread-pool-init
517 match-leak-kinds:possible,reachable,definite
522 fun:g_task_thread_pool_init
526 g-io-module-default-proxy-resolver-gnome
528 match-leak-kinds:reachable
531 fun:g_proxy_resolver_gnome_init
533 fun:_g_io_module_get_default
536 # One-time getaddrinfo() configuration loading
538 g-threaded-resolver-getaddrinfo-config
540 match-leak-kinds:reachable,definite
543 fun:__resolv_conf_allocate
546 fun:do_lookup_by_name
549 # memcheck checks that the third argument to ioctl() is a valid pointer, but
550 # some ioctls use that argument as an integer
552 ioctl-with-non-pointer-param
556 fun:btrfs_reflink_with_progress
561 drd:ConflictingAccess
565 g-private-get-helgrind
573 drd:ConflictingAccess
577 g-private-set-helgrind
583 g-type-construct-free
584 drd:ConflictingAccess
585 fun:g_type_free_instance
588 g-type-construct-free-helgrind
590 fun:g_type_free_instance
595 drd:ConflictingAccess
599 g-variant-unref-helgrind
606 drd:ConflictingAccess
607 fun:_g_main_create_unix_signal_watch
610 g-unix-signals-dispatch
611 drd:ConflictingAccess
613 fun:dispatch_unix_signals*
616 g-unix-signals-dispatch-helgrind
619 fun:dispatch_unix_signals*
623 drd:ConflictingAccess
624 fun:g_unix_signal_watch*
627 g-unix-signals-other-helgrind
629 fun:g_unix_signal_watch*
632 g-unix-signals-handler
633 drd:ConflictingAccess
634 fun:g_unix_signal_handler*
637 g-unix-signals-handler-helgrind
639 fun:g_unix_signal_handler*
642 g-unix-signals-worker
643 drd:ConflictingAccess
647 g-unix-signals-worker-helgrind
654 drd:ConflictingAccess
656 fun:g_wakeup_acknowledge
661 drd:ConflictingAccess
662 fun:g_type_fundamental
665 g-type-fundamental-helgrind
667 fun:g_type_fundamental
670 g-type-class-peek-static
671 drd:ConflictingAccess
672 fun:g_type_class_peek_static
675 g-type-class-peek-static-helgrind
677 fun:g_type_class_peek_static
681 drd:ConflictingAccess
693 g-inet-address-get-type
694 drd:ConflictingAccess
695 fun:g_inet_address_get_type
698 g-inet-address-get-type-helgrind
700 fun:g_inet_address_get_type
703 # From: https://github.com/fredericgermain/valgrind/blob/HEAD/glibc-2.X-drd.supp
706 drd:ConflictingAccess
711 drd:ConflictingAccess
716 drd:ConflictingAccess
720 # GSources do an opportunistic ref count check
722 g-source-set-ready-time
723 drd:ConflictingAccess
724 fun:g_source_set_ready_time
727 g-source-set-ready-time-helgrind
729 fun:g_source_set_ready_time
735 fun:g_source_iter_next
737 fun:g_main_context_iterate
741 g-object-instance-private
742 drd:ConflictingAccess
743 fun:*_get_instance_private
746 g-object-instance-private-helgrind
748 fun:*_get_instance_private
751 # GLib legitimately calls pthread_cond_signal without a mutex held
753 g-task-thread-complete
757 fun:g_task_thread_complete
760 g-task-thread-complete
764 fun:g_task_thread_complete
767 # False positive, but I can't explain how (FIXME)
776 # Real race, but is_cancelled() is an opportunistic function anyway
778 g-cancellable-is-cancelled
780 fun:g_cancellable_is_cancelled
789 fun:g_main_context_unref
796 fun:g_source_*_unlocked
801 fun:g_source_*_internal
806 g_object_real_dispose
808 fun:g_object_real_dispose
816 fun:g_object_new_valist
819 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
820 # These will not all be reachable on exit.
824 match-leak-kinds:definite,reachable
827 fun:set_str_if_different
831 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
832 # These will not all be reachable on exit.
836 match-leak-kinds:definite,reachable
839 fun:set_strv_if_different
843 # _g_unset_cached_tmp_dir() deliberately leaks the previous cached g_get_tmp_dir() values.
844 # These will not all be reachable on exit.
846 g_get_tmp_dir_test_init
848 match-leak-kinds:definite,reachable
856 # g_get_tmp_dir() caches a one-time allocation
860 match-leak-kinds:definite,reachable
866 # g_get_system_data_dirs() caches a one-time allocation
868 g_get_system_data_dirs
870 match-leak-kinds:reachable
873 fun:g_build_system_data_dirs
874 fun:g_get_system_data_dirs
877 # g_get_user_data_dir() caches a one-time allocation
881 match-leak-kinds:reachable
884 fun:g_build_user_data_dir
885 fun:g_get_user_data_dir
888 # g_get_home_dir() caches a one-time allocation
892 match-leak-kinds:reachable
899 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
901 desktop_file_dirs_malloc
903 match-leak-kinds:reachable
906 fun:desktop_file_dirs_lock
909 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
911 desktop_file_dirs_realloc
913 match-leak-kinds:reachable
916 fun:desktop_file_dirs_lock
919 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
921 desktop_file_dir_unindexed_setup_search
923 match-leak-kinds:reachable
926 fun:desktop_file_dir_unindexed_setup_search
927 fun:desktop_file_dir_unindexed_setup_search
930 #gutils.c caches system and user dirs and may need to replace them during tests.
932 g_build_user_data_dir
934 match-leak-kinds:definite
937 fun:g_build_user_data_dir
940 #gutils.c caches system and user dirs and may need to replace them during tests.
944 match-leak-kinds:definite
950 #gutils.c caches system and user dirs and may need to replace them during tests.
954 match-leak-kinds:definite
960 #gutils.c caches system and user dirs and may need to replace them during tests.
964 match-leak-kinds:definite
970 #gutils.c caches system and user dirs and may need to replace them during tests.
972 g_build_system_config_dirs
974 match-leak-kinds:definite
977 fun:g_build_system_config_dirs
980 #gutils.c caches system and user dirs and may need to replace them during tests.
982 g_build_system_data_dir
984 match-leak-kinds:definite
987 fun:g_build_system_data_dir
990 #gutils.c caches system and user dirs and may need to replace them during tests.
992 g_build_system_data_dirs
994 match-leak-kinds:definite
997 fun:g_build_system_data_dirs
1000 #gutils.c caches system and user dirs and may need to replace them during tests.
1002 g_build_user_cache_dir
1004 match-leak-kinds:definite
1007 fun:g_build_user_cache_dir
1010 #gutils.c caches system and user dirs and may need to replace them during tests.
1012 g_build_user_config_dir
1014 match-leak-kinds:definite
1017 fun:g_build_user_config_dir
1020 #gutils.c caches system and user dirs and may need to replace them during tests.
1022 g_build_user_data_dir
1024 match-leak-kinds:definite
1027 fun:g_build_user_data_dir
1030 #gutils.c caches system and user dirs and may need to replace them during tests.
1032 g_build_user_runtime_dir
1034 match-leak-kinds:definite
1037 fun:g_build_user_runtime_dir
1040 #gutils.c caches system and user dirs and may need to replace them during tests.
1042 g_build_user_state_dir
1044 match-leak-kinds:definite
1047 fun:g_build_user_state_dir
1050 # g_io_extension_point_register() caches a one-time allocation global table of @extension_points.
1052 g_io_extension_point_register
1054 match-leak-kinds:reachable
1057 fun:g_io_extension_point_register
1060 # g_strerror() caches a one-time allocation global table of @errors.
1064 match-leak-kinds:reachable
1067 fun:g_locale_to_utf8
1071 # g_socket_connection_factory_register_type() caches a one-time allocation global table of @connection_types.
1073 g_socket_connection_factory_register_type
1075 match-leak-kinds:reachable
1078 fun:g_socket_connection_factory_register_type
1081 # g_dbus_error_quark() never unregisters itself as a GDBusError domain, as it’s always available
1085 match-leak-kinds:reachable
1088 fun:g_dbus_error_register_error_domain
1089 fun:g_dbus_error_quark
1092 # g_win32_registry_get_os_dirs_w*() caches an array of strings that is allocated only once.
1094 g_win32_registry_get_os_dirs
1096 match-leak-kinds:reachable,definite
1099 fun:g_win32_registry_get_os_dirs*
1102 # Thread-private data allocated once per thread
1104 g_private_set_alloc0
1106 match-leak-kinds:definite,reachable
1109 fun:g_private_set_alloc0
1112 g_private_set_alloc0-calloc
1114 match-leak-kinds:definite,reachable
1117 fun:g_private_set_alloc0
1120 # Keys for thread-private data
1124 match-leak-kinds:reachable
1126 fun:g_private_impl_new
1129 # Thread-private GMainContext stack
1131 g_main_context_push_thread_default
1133 match-leak-kinds:definite,reachable
1137 fun:g_main_context_push_thread_default
1140 # One-time allocations for #GFileInfo attribute cache
1142 g_file_info_attribute_cache
1144 match-leak-kinds:reachable
1147 fun:ensure_attribute_hash
1152 g_file_info_attribute_cache2
1154 match-leak-kinds:reachable
1157 fun:ensure_attribute_hash
1162 g_file_info_attribute_cache3
1164 match-leak-kinds:reachable
1167 fun:lookup_namespace
1172 g_file_info_attribute_cache4
1174 match-leak-kinds:reachable
1177 fun:lookup_namespace
1186 match-leak-kinds:reachable
1193 g_get_charset_calloc
1195 match-leak-kinds:reachable
1201 # Global unused thread queue
1203 g_thread_pool_unused_thread_queue
1205 match-leak-kinds:reachable
1208 fun:g_async_queue_new_full
1210 fun:g_thread_pool_new
1213 # One-time program name storage
1217 match-leak-kinds:reachable
1223 # Error domains hash
1227 match-leak-kinds: reachable
1230 fun:g_hash_table_new_full
1234 # Error domain static registration
1236 g_error_domain_register_static
1238 match-leak-kinds: reachable
1241 fun:g_hash_table_insert
1242 fun:error_domain_register
1243 fun:g_error_domain_register_static
1249 match-leak-kinds:reachable
1252 fun:g_hash_table_insert
1257 xdg_mime_init_malloc
1265 xdg_mime_init_calloc