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
102 fun:gobject_init_ctor
108 match-leak-kinds:possible,reachable
111 fun:gobject_init_ctor
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-io-module-default-singleton-malloc
372 match-leak-kinds:reachable
375 fun:g_type_create_instance
377 fun:_g_io_module_get_default
381 g-io-module-default-singleton-calloc
383 match-leak-kinds:reachable
386 fun:g_type_create_instance
388 fun:_g_io_module_get_default
391 # This one seems to show up sometimes with g_type_create_instance() at the top
392 # of the stack, as well.
394 g-io-module-default-singleton
396 match-leak-kinds:reachable
397 fun:g_type_create_instance
399 fun:_g_io_module_get_default
403 g-io-module-default-singleton-module
405 match-leak-kinds:reachable
410 fun:_g_io_module_get_default
414 g-io-module-default-singleton-name
416 match-leak-kinds:reachable
421 fun:_g_io_module_get_default*
425 g-io-module-default-singleton-weak-ref
429 fun:_g_io_module_get_default
433 g-get-language-names-malloc
435 match-leak-kinds:reachable
438 fun:g_get_language_names
442 g-get-language-names-calloc
444 match-leak-kinds:reachable
447 fun:g_get_language_names
451 g-get-language_names-with-category-malloc
453 match-leak-kinds:reachable
456 fun:g_get_language_names_with_category
460 g-get-language_names-with-category-calloc
462 match-leak-kinds:reachable
465 fun:g_get_language_names_with_category
469 g-get-language_names-with-category-realloc
471 match-leak-kinds:reachable
474 fun:g_get_language_names_with_category
480 match-leak-kinds:reachable
483 fun:g_static_mutex_get_mutex_impl
489 match-leak-kinds:possible,reachable
492 fun:g_system_thread_new
496 g-system-thread-init-malloc
498 match-leak-kinds:possible,reachable
501 fun:g_system_thread_new
505 g-task-thread-pool-init
507 match-leak-kinds:possible,reachable,definite
512 fun:g_task_thread_pool_init
516 g-io-module-default-proxy-resolver-gnome
518 match-leak-kinds:reachable
521 fun:g_proxy_resolver_gnome_init
523 fun:_g_io_module_get_default
526 # One-time getaddrinfo() configuration loading
528 g-threaded-resolver-getaddrinfo-config
530 match-leak-kinds:reachable,definite
533 fun:__resolv_conf_allocate
536 fun:do_lookup_by_name
539 # memcheck checks that the third argument to ioctl() is a valid pointer, but
540 # some ioctls use that argument as an integer
542 ioctl-with-non-pointer-param
546 fun:btrfs_reflink_with_progress
551 drd:ConflictingAccess
555 g-private-get-helgrind
563 drd:ConflictingAccess
567 g-private-set-helgrind
573 g-type-construct-free
574 drd:ConflictingAccess
575 fun:g_type_free_instance
578 g-type-construct-free-helgrind
580 fun:g_type_free_instance
585 drd:ConflictingAccess
589 g-variant-unref-helgrind
596 drd:ConflictingAccess
597 fun:_g_main_create_unix_signal_watch
600 g-unix-signals-dispatch
601 drd:ConflictingAccess
603 fun:dispatch_unix_signals*
606 g-unix-signals-dispatch-helgrind
609 fun:dispatch_unix_signals*
613 drd:ConflictingAccess
614 fun:g_unix_signal_watch*
617 g-unix-signals-other-helgrind
619 fun:g_unix_signal_watch*
622 g-unix-signals-handler
623 drd:ConflictingAccess
624 fun:g_unix_signal_handler*
627 g-unix-signals-handler-helgrind
629 fun:g_unix_signal_handler*
632 g-unix-signals-worker
633 drd:ConflictingAccess
637 g-unix-signals-worker-helgrind
644 drd:ConflictingAccess
646 fun:g_wakeup_acknowledge
651 drd:ConflictingAccess
652 fun:g_type_fundamental
655 g-type-fundamental-helgrind
657 fun:g_type_fundamental
660 g-type-class-peek-static
661 drd:ConflictingAccess
662 fun:g_type_class_peek_static
665 g-type-class-peek-static-helgrind
667 fun:g_type_class_peek_static
671 drd:ConflictingAccess
683 g-inet-address-get-type
684 drd:ConflictingAccess
685 fun:g_inet_address_get_type
688 g-inet-address-get-type-helgrind
690 fun:g_inet_address_get_type
693 # From: https://github.com/fredericgermain/valgrind/blob/master/glibc-2.X-drd.supp
696 drd:ConflictingAccess
701 drd:ConflictingAccess
706 drd:ConflictingAccess
710 # GSources do an opportunistic ref count check
712 g-source-set-ready-time
713 drd:ConflictingAccess
714 fun:g_source_set_ready_time
717 g-source-set-ready-time-helgrind
719 fun:g_source_set_ready_time
725 fun:g_source_iter_next
727 fun:g_main_context_iterate
731 g-object-instance-private
732 drd:ConflictingAccess
733 fun:*_get_instance_private
736 g-object-instance-private-helgrind
738 fun:*_get_instance_private
741 # GLib legitimately calls pthread_cond_signal without a mutex held
743 g-task-thread-complete
747 fun:g_task_thread_complete
750 g-task-thread-complete
754 fun:g_task_thread_complete
757 # False positive, but I can't explain how (FIXME)
766 # Real race, but is_cancelled() is an opportunistic function anyway
768 g-cancellable-is-cancelled
770 fun:g_cancellable_is_cancelled
779 fun:g_main_context_unref
786 fun:g_source_*_unlocked
791 fun:g_source_*_internal
796 g_object_real_dispose
798 fun:g_object_real_dispose
806 fun:g_object_new_valist
809 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
810 # These will not all be reachable on exit.
814 match-leak-kinds:definite,reachable
817 fun:set_str_if_different
821 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
822 # These will not all be reachable on exit.
826 match-leak-kinds:definite,reachable
829 fun:set_strv_if_different
833 # g_get_system_data_dirs() caches a one-time allocation
835 g_get_system_data_dirs
837 match-leak-kinds:reachable
840 fun:g_build_system_data_dirs
841 fun:g_get_system_data_dirs
844 # g_get_user_data_dir() caches a one-time allocation
848 match-leak-kinds:reachable
851 fun:g_build_user_data_dir
852 fun:g_get_user_data_dir
855 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
857 desktop_file_dirs_malloc
859 match-leak-kinds:reachable
862 fun:desktop_file_dirs_lock
865 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
867 desktop_file_dirs_realloc
869 match-leak-kinds:reachable
872 fun:desktop_file_dirs_lock
875 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
877 desktop_file_dir_unindexed_setup_search
879 match-leak-kinds:reachable
882 fun:desktop_file_dir_unindexed_setup_search
883 fun:desktop_file_dir_unindexed_setup_search
886 # g_io_extension_point_register() caches a one-time allocation global table of @extension_points.
888 g_io_extension_point_register
890 match-leak-kinds:reachable
893 fun:g_io_extension_point_register
896 # g_strerror() caches a one-time allocation global table of @errors.
900 match-leak-kinds:reachable
907 # g_socket_connection_factory_register_type() caches a one-time allocation global table of @connection_types.
909 g_socket_connection_factory_register_type
911 match-leak-kinds:reachable
914 fun:g_socket_connection_factory_register_type
917 # g_dbus_error_quark() never unregisters itself as a GDBusError domain, as it’s always available
921 match-leak-kinds:reachable
924 fun:g_dbus_error_register_error_domain
925 fun:g_dbus_error_quark
928 # g_win32_registry_get_os_dirs_w*() caches an array of strings that is allocated only once.
930 g_win32_registry_get_os_dirs
932 match-leak-kinds:reachable,definite
935 fun:g_win32_registry_get_os_dirs*
938 # Thread-private data allocated once per thread
942 match-leak-kinds:definite,reachable
945 fun:g_private_set_alloc0
948 g_private_set_alloc0-calloc
950 match-leak-kinds:definite,reachable
953 fun:g_private_set_alloc0
956 # Keys for thread-private data
960 match-leak-kinds:reachable
962 fun:g_private_impl_new
965 # Thread-private GMainContext stack
967 g_main_context_push_thread_default
969 match-leak-kinds:definite,reachable
973 fun:g_main_context_push_thread_default
976 # One-time allocations for #GFileInfo attribute cache
978 g_file_info_attribute_cache
980 match-leak-kinds:reachable
983 fun:ensure_attribute_hash
988 g_file_info_attribute_cache2
990 match-leak-kinds:reachable
993 fun:ensure_attribute_hash
998 g_file_info_attribute_cache3
1000 match-leak-kinds:reachable
1003 fun:lookup_namespace
1008 g_file_info_attribute_cache4
1010 match-leak-kinds:reachable
1013 fun:lookup_namespace
1022 match-leak-kinds:reachable
1029 g_get_charset_calloc
1031 match-leak-kinds:reachable
1037 # Global unused thread queue
1039 g_thread_pool_unused_thread_queue
1041 match-leak-kinds:reachable
1044 fun:g_async_queue_new_full
1046 fun:g_thread_pool_new
1049 # One-time program name storage
1053 match-leak-kinds:reachable
1059 # Error domains hash
1063 match-leak-kinds: reachable
1066 fun:g_hash_table_new_full
1070 # Error domain static registration
1072 g_error_domain_register_static
1074 match-leak-kinds: reachable
1077 fun:g_hash_table_insert
1078 fun:error_domain_register
1079 fun:g_error_domain_register_static
1085 match-leak-kinds:reachable
1088 fun:g_hash_table_insert