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:possible,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:possible,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
234 match-leak-kinds:reachable
243 match-leak-kinds:reachable
245 fun:g_hash_table_resize
251 g-type-interface-init
253 match-leak-kinds:reachable
256 fun:type_iface_vtable_base_init_Wm
260 g-type-class-init-calloc
262 match-leak-kinds:reachable
265 fun:type_class_init_Wm
271 match-leak-kinds:reachable
272 fun:g_type_create_instance
274 fun:type_class_init_Wm
278 g-object-do-class-init-signals
280 match-leak-kinds:reachable
284 fun:type_class_init_Wm
290 match-leak-kinds:reachable
293 fun:type_iface_add_prerequisite_W
297 g-type-add-interface-check
299 match-leak-kinds:reachable
302 fun:g_type_add_interface_check
304 fun:type_class_init_Wm
308 g-type-add-interface-check-realloc
310 match-leak-kinds:reachable
313 fun:g_type_add_interface_check
315 fun:type_class_init_Wm
319 g-object-class-install-property
321 match-leak-kinds:reachable
324 fun:validate_and_install_class_property
326 fun:type_class_init_Wm
330 g-param-spec-pool-new
332 match-leak-kinds:reachable
335 fun:g_param_spec_pool_new
337 fun:type_class_init_Wm
340 # weak_locations_lock in gobject.c
344 match-leak-kinds:reachable
347 fun:g_rw_lock_get_impl
353 g-object-base-class-init-construct-pproperties
355 match-leak-kinds:reachable
359 fun:g_object_base_class_init
360 fun:type_class_init_Wm
368 fun:type_class_init_Wm
374 g-io-module-default-singleton-malloc
376 match-leak-kinds:reachable
379 fun:g_type_create_instance
381 fun:_g_io_module_get_default
385 g-io-module-default-singleton-calloc
387 match-leak-kinds:reachable
390 fun:g_type_create_instance
392 fun:_g_io_module_get_default
395 # This one seems to show up sometimes with g_type_create_instance() at the top
396 # of the stack, as well.
398 g-io-module-default-singleton
400 match-leak-kinds:reachable
401 fun:g_type_create_instance
403 fun:_g_io_module_get_default
407 g-io-module-default-singleton-module
409 match-leak-kinds:reachable
414 fun:_g_io_module_get_default
418 g-io-module-default-singleton-name
420 match-leak-kinds:reachable
425 fun:_g_io_module_get_default*
429 g-get-language-names-malloc
431 match-leak-kinds:reachable
434 fun:g_get_language_names
438 g-get-language-names-calloc
440 match-leak-kinds:reachable
443 fun:g_get_language_names
447 g-get-language_names-with-category-malloc
449 match-leak-kinds:reachable
452 fun:g_get_language_names_with_category
456 g-get-language_names-with-category-calloc
458 match-leak-kinds:reachable
461 fun:g_get_language_names_with_category
465 g-get-language_names-with-category-realloc
467 match-leak-kinds:reachable
470 fun:g_get_language_names_with_category
476 match-leak-kinds:reachable
479 fun:g_static_mutex_get_mutex_impl
485 match-leak-kinds:possible,reachable
488 fun:g_system_thread_new
492 g-task-thread-pool-init
494 match-leak-kinds:possible,reachable,definite
499 fun:g_task_thread_pool_init
503 g-io-module-default-proxy-resolver-gnome
505 match-leak-kinds:reachable
508 fun:g_proxy_resolver_gnome_init
510 fun:_g_io_module_get_default
513 # One-time getaddrinfo() configuration loading
515 g-threaded-resolver-getaddrinfo-config
517 match-leak-kinds:reachable,definite
520 fun:__resolv_conf_allocate
523 fun:do_lookup_by_name
526 # memcheck checks that the third argument to ioctl() is a valid pointer, but
527 # some ioctls use that argument as an integer
529 ioctl-with-non-pointer-param
533 fun:btrfs_reflink_with_progress
538 drd:ConflictingAccess
542 g-private-get-helgrind
550 drd:ConflictingAccess
554 g-private-set-helgrind
560 g-type-construct-free
561 drd:ConflictingAccess
562 fun:g_type_free_instance
565 g-type-construct-free-helgrind
567 fun:g_type_free_instance
572 drd:ConflictingAccess
576 g-variant-unref-helgrind
583 drd:ConflictingAccess
584 fun:_g_main_create_unix_signal_watch
587 g-unix-signals-dispatch
588 drd:ConflictingAccess
590 fun:dispatch_unix_signals*
593 g-unix-signals-dispatch-helgrind
596 fun:dispatch_unix_signals*
600 drd:ConflictingAccess
601 fun:g_unix_signal_watch*
604 g-unix-signals-other-helgrind
606 fun:g_unix_signal_watch*
609 g-unix-signals-handler
610 drd:ConflictingAccess
611 fun:g_unix_signal_handler*
614 g-unix-signals-handler-helgrind
616 fun:g_unix_signal_handler*
619 g-unix-signals-worker
620 drd:ConflictingAccess
624 g-unix-signals-worker-helgrind
631 drd:ConflictingAccess
633 fun:g_wakeup_acknowledge
638 drd:ConflictingAccess
639 fun:g_type_fundamental
642 g-type-fundamental-helgrind
644 fun:g_type_fundamental
647 g-type-class-peek-static
648 drd:ConflictingAccess
649 fun:g_type_class_peek_static
652 g-type-class-peek-static-helgrind
654 fun:g_type_class_peek_static
658 drd:ConflictingAccess
670 g-inet-address-get-type
671 drd:ConflictingAccess
672 fun:g_inet_address_get_type
675 g-inet-address-get-type-helgrind
677 fun:g_inet_address_get_type
680 # From: https://github.com/fredericgermain/valgrind/blob/master/glibc-2.X-drd.supp
683 drd:ConflictingAccess
688 drd:ConflictingAccess
693 drd:ConflictingAccess
697 # GSources do an opportunistic ref count check
699 g-source-set-ready-time
700 drd:ConflictingAccess
701 fun:g_source_set_ready_time
704 g-source-set-ready-time-helgrind
706 fun:g_source_set_ready_time
712 fun:g_source_iter_next
714 fun:g_main_context_iterate
718 g-object-instance-private
719 drd:ConflictingAccess
720 fun:*_get_instance_private
723 g-object-instance-private-helgrind
725 fun:*_get_instance_private
728 # GLib legitimately calls pthread_cond_signal without a mutex held
730 g-task-thread-complete
734 fun:g_task_thread_complete
737 g-task-thread-complete
741 fun:g_task_thread_complete
744 # False positive, but I can't explain how (FIXME)
753 # Real race, but is_cancelled() is an opportunistic function anyway
755 g-cancellable-is-cancelled
757 fun:g_cancellable_is_cancelled
766 fun:g_main_context_unref
773 fun:g_source_*_unlocked
778 fun:g_source_*_internal
783 g_object_real_dispose
785 fun:g_object_real_dispose
793 fun:g_object_new_valist
796 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
797 # These will not all be reachable on exit.
801 match-leak-kinds:definite,reachable
804 fun:set_str_if_different
808 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
809 # These will not all be reachable on exit.
813 match-leak-kinds:definite,reachable
816 fun:set_strv_if_different
820 # g_get_system_data_dirs() caches a one-time allocation
822 g_get_system_data_dirs
824 match-leak-kinds:reachable
827 fun:g_build_system_data_dirs
828 fun:g_get_system_data_dirs
831 # g_get_user_data_dir() caches a one-time allocation
835 match-leak-kinds:reachable
838 fun:g_build_user_data_dir
839 fun:g_get_user_data_dir
842 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
844 desktop_file_dirs_malloc
846 match-leak-kinds:reachable
849 fun:desktop_file_dirs_lock
852 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
854 desktop_file_dirs_realloc
856 match-leak-kinds:reachable
859 fun:desktop_file_dirs_lock
862 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
864 desktop_file_dir_unindexed_setup_search
866 match-leak-kinds:reachable
869 fun:desktop_file_dir_unindexed_setup_search
870 fun:desktop_file_dir_unindexed_setup_search
873 # g_io_extension_point_register() caches a one-time allocation global table of @extension_points.
875 g_io_extension_point_register
877 match-leak-kinds:reachable
880 fun:g_io_extension_point_register
883 # g_strerror() caches a one-time allocation global table of @errors.
887 match-leak-kinds:reachable
894 # g_socket_connection_factory_register_type() caches a one-time allocation global table of @connection_types.
896 g_socket_connection_factory_register_type
898 match-leak-kinds:reachable
901 fun:g_socket_connection_factory_register_type
904 # g_dbus_error_quark() never unregisters itself as a GDBusError domain, as it’s always available
908 match-leak-kinds:reachable
911 fun:g_dbus_error_register_error_domain
912 fun:g_dbus_error_quark
915 # g_win32_registry_get_os_dirs_w*() caches an array of strings that is allocated only once.
917 g_win32_registry_get_os_dirs
919 match-leak-kinds:reachable,definite
922 fun:g_win32_registry_get_os_dirs*
925 # Thread-private data allocated once per thread
929 match-leak-kinds:definite,reachable
932 fun:g_private_set_alloc0
935 g_private_set_alloc0-calloc
937 match-leak-kinds:definite,reachable
940 fun:g_private_set_alloc0
943 # Keys for thread-private data
947 match-leak-kinds:reachable
949 fun:g_private_impl_new
952 # Thread-private GMainContext stack
954 g_main_context_push_thread_default
956 match-leak-kinds:definite,reachable
960 fun:g_main_context_push_thread_default
963 # One-time allocations for #GFileInfo attribute cache
965 g_file_info_attribute_cache
967 match-leak-kinds:reachable
970 fun:ensure_attribute_hash
975 g_file_info_attribute_cache2
977 match-leak-kinds:reachable
980 fun:ensure_attribute_hash
985 g_file_info_attribute_cache3
987 match-leak-kinds:reachable
995 g_file_info_attribute_cache4
997 match-leak-kinds:reachable
1000 fun:lookup_namespace
1009 match-leak-kinds:reachable
1015 # Global unused thread queue
1017 g_thread_pool_unused_thread_queue
1019 match-leak-kinds:reachable
1022 fun:g_async_queue_new_full
1024 fun:g_thread_pool_new
1027 # One-time program name storage
1031 match-leak-kinds:reachable