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
83 match-leak-kinds:reachable
94 match-leak-kinds:reachable
103 match-leak-kinds:reachable
106 fun:gobject_init_ctor
112 match-leak-kinds:possible,reachable
115 fun:gobject_init_ctor
119 g-type-register-dynamic
121 match-leak-kinds:reachable
124 fun:g_type_register_dynamic
128 g-type-register-static
130 match-leak-kinds:reachable
133 fun:g_type_register_static
137 g-type-register-static-realloc
139 match-leak-kinds:possible,reachable
142 fun:g_type_register_static
146 g-type-register-static-calloc
148 match-leak-kinds:reachable
151 fun:g_type_register_static
155 g-type-register-fundamental
157 match-leak-kinds:possible,reachable
160 fun:g_type_register_fundamental
164 g-type-register-fundamental-calloc
166 match-leak-kinds:possible,reachable
169 fun:g_type_register_fundamental
173 g-type-add-interface-dynamic
175 match-leak-kinds:reachable
178 fun:g_type_add_interface_dynamic
182 g-type-add-interface-static
184 match-leak-kinds:reachable
187 fun:g_type_add_interface_static
191 g-type-add-interface-static-realloc
193 match-leak-kinds:reachable
196 fun:g_type_add_interface_static
200 g-type-add-interface-static-calloc
202 match-leak-kinds:reachable
205 fun:g_type_add_interface_static
211 match-leak-kinds:reachable
214 fun:g_rand_new_with_seed_array
223 match-leak-kinds:reachable
226 fun:g_rand_new_with_seed_array
228 fun:get_global_random
236 match-leak-kinds:reachable
245 match-leak-kinds:reachable
247 fun:g_hash_table_resize
253 g-type-interface-init
255 match-leak-kinds:reachable
258 fun:type_iface_vtable_base_init_Wm
262 g-type-class-init-calloc
264 match-leak-kinds:reachable
267 fun:type_class_init_Wm
273 match-leak-kinds:reachable
274 fun:g_type_create_instance
276 fun:type_class_init_Wm
280 g-object-do-class-init-signals
282 match-leak-kinds:reachable
286 fun:type_class_init_Wm
292 match-leak-kinds:reachable
295 fun:type_iface_add_prerequisite_W
299 g-type-add-interface-check
301 match-leak-kinds:reachable
304 fun:g_type_add_interface_check
306 fun:type_class_init_Wm
310 g-type-add-interface-check-realloc
312 match-leak-kinds:reachable
315 fun:g_type_add_interface_check
317 fun:type_class_init_Wm
321 g-object-class-install-property
323 match-leak-kinds:reachable
326 fun:validate_and_install_class_property
328 fun:type_class_init_Wm
332 g-param-spec-pool-new
334 match-leak-kinds:reachable
337 fun:g_param_spec_pool_new
339 fun:type_class_init_Wm
342 # weak_locations_lock in gobject.c
346 match-leak-kinds:reachable
349 fun:g_rw_lock_get_impl
355 g-object-base-class-init-construct-pproperties
357 match-leak-kinds:reachable
361 fun:g_object_base_class_init
362 fun:type_class_init_Wm
370 fun:type_class_init_Wm
376 g-io-module-default-singleton-malloc
378 match-leak-kinds:reachable
381 fun:g_type_create_instance
383 fun:_g_io_module_get_default
387 g-io-module-default-singleton-calloc
389 match-leak-kinds:reachable
392 fun:g_type_create_instance
394 fun:_g_io_module_get_default
397 # This one seems to show up sometimes with g_type_create_instance() at the top
398 # of the stack, as well.
400 g-io-module-default-singleton
402 match-leak-kinds:reachable
403 fun:g_type_create_instance
405 fun:_g_io_module_get_default
409 g-io-module-default-singleton-module
411 match-leak-kinds:reachable
416 fun:_g_io_module_get_default
420 g-io-module-default-singleton-name
422 match-leak-kinds:reachable
427 fun:_g_io_module_get_default*
431 g-get-language-names-malloc
433 match-leak-kinds:reachable
436 fun:g_get_language_names
440 g-get-language-names-calloc
442 match-leak-kinds:reachable
445 fun:g_get_language_names
451 match-leak-kinds:reachable
454 fun:g_static_mutex_get_mutex_impl
460 match-leak-kinds:possible,reachable
463 fun:g_system_thread_new
467 g-task-thread-pool-init
469 match-leak-kinds:possible,reachable,definite
474 fun:g_task_thread_pool_init
478 g-io-module-default-proxy-resolver-gnome
480 match-leak-kinds:reachable
483 fun:g_proxy_resolver_gnome_init
485 fun:_g_io_module_get_default
488 # One-time getaddrinfo() configuration loading
490 g-threaded-resolver-getaddrinfo-config
492 match-leak-kinds:reachable,definite
495 fun:__resolv_conf_allocate
498 fun:do_lookup_by_name
501 # memcheck checks that the third argument to ioctl() is a valid pointer, but
502 # some ioctls use that argument as an integer
504 ioctl-with-non-pointer-param
508 fun:btrfs_reflink_with_progress
513 drd:ConflictingAccess
517 g-private-get-helgrind
525 drd:ConflictingAccess
529 g-private-set-helgrind
535 g-type-construct-free
536 drd:ConflictingAccess
537 fun:g_type_free_instance
540 g-type-construct-free-helgrind
542 fun:g_type_free_instance
547 drd:ConflictingAccess
551 g-variant-unref-helgrind
558 drd:ConflictingAccess
559 fun:_g_main_create_unix_signal_watch
562 g-unix-signals-dispatch
563 drd:ConflictingAccess
565 fun:dispatch_unix_signals*
568 g-unix-signals-dispatch-helgrind
571 fun:dispatch_unix_signals*
575 drd:ConflictingAccess
576 fun:g_unix_signal_watch*
579 g-unix-signals-other-helgrind
581 fun:g_unix_signal_watch*
584 g-unix-signals-handler
585 drd:ConflictingAccess
586 fun:g_unix_signal_handler*
589 g-unix-signals-handler-helgrind
591 fun:g_unix_signal_handler*
594 g-unix-signals-worker
595 drd:ConflictingAccess
599 g-unix-signals-worker-helgrind
606 drd:ConflictingAccess
608 fun:g_wakeup_acknowledge
613 drd:ConflictingAccess
614 fun:g_type_fundamental
617 g-type-fundamental-helgrind
619 fun:g_type_fundamental
622 g-type-class-peek-static
623 drd:ConflictingAccess
624 fun:g_type_class_peek_static
627 g-type-class-peek-static-helgrind
629 fun:g_type_class_peek_static
633 drd:ConflictingAccess
645 g-inet-address-get-type
646 drd:ConflictingAccess
647 fun:g_inet_address_get_type
650 g-inet-address-get-type-helgrind
652 fun:g_inet_address_get_type
655 # From: https://github.com/fredericgermain/valgrind/blob/master/glibc-2.X-drd.supp
658 drd:ConflictingAccess
663 drd:ConflictingAccess
668 drd:ConflictingAccess
672 # GSources do an opportunistic ref count check
674 g-source-set-ready-time
675 drd:ConflictingAccess
676 fun:g_source_set_ready_time
679 g-source-set-ready-time-helgrind
681 fun:g_source_set_ready_time
687 fun:g_source_iter_next
689 fun:g_main_context_iterate
693 g-object-instance-private
694 drd:ConflictingAccess
695 fun:*_get_instance_private
698 g-object-instance-private-helgrind
700 fun:*_get_instance_private
703 # GLib legitimately calls pthread_cond_signal without a mutex held
705 g-task-thread-complete
709 fun:g_task_thread_complete
712 g-task-thread-complete
716 fun:g_task_thread_complete
719 # False positive, but I can't explain how (FIXME)
728 # Real race, but is_cancelled() is an opportunistic function anyway
730 g-cancellable-is-cancelled
732 fun:g_cancellable_is_cancelled
741 fun:g_main_context_unref
748 fun:g_source_*_unlocked
753 fun:g_source_*_internal
758 g_object_real_dispose
760 fun:g_object_real_dispose
768 fun:g_object_new_valist
771 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
772 # These will not all be reachable on exit.
776 match-leak-kinds:definite,reachable
779 fun:set_str_if_different
783 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
784 # These will not all be reachable on exit.
788 match-leak-kinds:definite,reachable
791 fun:set_strv_if_different
795 # g_get_system_data_dirs() caches a one-time allocation
797 g_get_system_data_dirs
799 match-leak-kinds:reachable
802 fun:g_build_system_data_dirs
803 fun:g_get_system_data_dirs
806 # g_get_user_data_dir() caches a one-time allocation
810 match-leak-kinds:reachable
813 fun:g_build_user_data_dir
814 fun:g_get_user_data_dir
817 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
819 desktop_file_dirs_malloc
821 match-leak-kinds:reachable
824 fun:desktop_file_dirs_lock
827 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
829 desktop_file_dirs_realloc
831 match-leak-kinds:reachable
834 fun:desktop_file_dirs_lock
837 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
839 desktop_file_dir_unindexed_setup_search
841 match-leak-kinds:reachable
844 fun:desktop_file_dir_unindexed_setup_search
845 fun:desktop_file_dir_unindexed_setup_search
848 # g_io_extension_point_register() caches a one-time allocation global table of @extension_points.
850 g_io_extension_point_register
852 match-leak-kinds:reachable
855 fun:g_io_extension_point_register
858 # g_strerror() caches a one-time allocation global table of @errors.
862 match-leak-kinds:reachable
869 # g_socket_connection_factory_register_type() caches a one-time allocation global table of @connection_types.
871 g_socket_connection_factory_register_type
873 match-leak-kinds:reachable
876 fun:g_socket_connection_factory_register_type
879 # g_dbus_error_quark() never unregisters itself as a GDBusError domain, as it’s always available
883 match-leak-kinds:reachable
886 fun:g_dbus_error_register_error_domain
887 fun:g_dbus_error_quark
890 # Thread-private data allocated once per thread
894 match-leak-kinds:definite,reachable
897 fun:g_private_set_alloc0
900 g_private_set_alloc0-calloc
902 match-leak-kinds:definite,reachable
905 fun:g_private_set_alloc0
908 # Thread-private GMainContext stack
910 g_main_context_push_thread_default
912 match-leak-kinds:definite,reachable
916 fun:g_main_context_push_thread_default
919 # One-time allocations for #GFileInfo attribute cache
921 g_file_info_attribute_cache
923 match-leak-kinds:reachable
926 fun:ensure_attribute_hash
931 g_file_info_attribute_cache2
933 match-leak-kinds:reachable
936 fun:ensure_attribute_hash
941 g_file_info_attribute_cache3
943 match-leak-kinds:reachable
951 g_file_info_attribute_cache4
953 match-leak-kinds:reachable