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
39 g-tls-backend-gnutls-init
42 fun:g_tls_backend_gnutls_init
50 fun:create_tokens_inlock
51 fun:initialize_module_inlock_reentrant
54 # One-time allocation from libc for getpwnam() results
61 fun:g_local_vfs_parse_name
105 fun:gobject_init_ctor
109 g-type-register-dynamic
113 fun:g_type_register_dynamic
117 g-type-register-static
121 fun:g_type_register_static
125 g-type-register-static-realloc
129 fun:g_type_register_static
133 g-type-register-static-calloc
137 fun:g_type_register_static
141 g-type-add-interface-dynamic
145 fun:g_type_add_interface_dynamic
149 g-type-add-interface-static
153 fun:g_type_add_interface_static
157 g-type-add-interface-static-realloc
159 match-leak-kinds:reachable
162 fun:g_type_add_interface_static
166 g-type-add-interface-static-calloc
168 match-leak-kinds:reachable
171 fun:g_type_add_interface_static
179 fun:g_rand_new_with_seed_array
190 fun:g_rand_new_with_seed_array
192 fun:get_global_random
209 fun:g_hash_table_resize
215 g-type-interface-init
219 fun:type_iface_vtable_base_init_Wm
223 g-type-class-init-calloc
225 match-leak-kinds:reachable
228 fun:type_class_init_Wm
234 fun:g_type_create_instance
236 fun:type_class_init_Wm
240 g-object-do-class-init-signals
242 match-leak-kinds:reachable
246 fun:type_class_init_Wm
252 match-leak-kinds:reachable
255 fun:type_iface_add_prerequisite_W
259 g-type-add-interface-check
261 match-leak-kinds:reachable
264 fun:g_type_add_interface_check
266 fun:type_class_init_Wm
270 g-type-add-interface-check-realloc
272 match-leak-kinds:reachable
275 fun:g_type_add_interface_check
277 fun:type_class_init_Wm
281 g-object-class-install-property
283 match-leak-kinds:reachable
286 fun:validate_and_install_class_property
288 fun:type_class_init_Wm
292 g-param-spec-pool-new
294 match-leak-kinds:reachable
297 fun:g_param_spec_pool_new
299 fun:type_class_init_Wm
302 # weak_locations_lock in gobject.c
306 match-leak-kinds:reachable
309 fun:g_rw_lock_get_impl
315 g-object-base-class-init-construct-pproperties
317 match-leak-kinds:reachable
321 fun:g_object_base_class_init
322 fun:type_class_init_Wm
330 fun:type_class_init_Wm
336 g-io-module-default-singleton-malloc
340 fun:g_type_create_instance
342 fun:_g_io_module_get_default
346 g-io-module-default-singleton-calloc
350 fun:g_type_create_instance
352 fun:_g_io_module_get_default
355 # This one seems to show up sometimes with g_type_create_instance() at the top
356 # of the stack, as well.
358 g-io-module-default-singleton
360 fun:g_type_create_instance
362 fun:_g_io_module_get_default
366 g-io-module-default-singleton-module
372 fun:_g_io_module_get_default
376 g-io-module-default-singleton-name
382 fun:_g_io_module_get_default*
386 g-get-language-names-malloc
390 fun:g_get_language_names
394 g-get-language-names-calloc
398 fun:g_get_language_names
406 fun:g_static_mutex_get_mutex_impl
414 fun:g_system_thread_new
418 g-io-module-default-proxy-resolver-gnome
422 fun:g_proxy_resolver_gnome_init
424 fun:_g_io_module_get_default
427 # One-time getaddrinfo() configuration loading
429 g-threaded-resolver-getaddrinfo-config
433 fun:__resolv_conf_allocate
436 fun:do_lookup_by_name
439 # memcheck checks that the third argument to ioctl() is a valid pointer, but
440 # some ioctls use that argument as an integer
442 ioctl-with-non-pointer-param
446 fun:btrfs_reflink_with_progress
451 drd:ConflictingAccess
455 g-private-get-helgrind
463 drd:ConflictingAccess
467 g-private-set-helgrind
473 g-type-construct-free
474 drd:ConflictingAccess
475 fun:g_type_free_instance
478 g-type-construct-free-helgrind
480 fun:g_type_free_instance
485 drd:ConflictingAccess
489 g-variant-unref-helgrind
496 drd:ConflictingAccess
497 fun:_g_main_create_unix_signal_watch
500 g-unix-signals-dispatch
501 drd:ConflictingAccess
503 fun:dispatch_unix_signals*
506 g-unix-signals-dispatch-helgrind
509 fun:dispatch_unix_signals*
513 drd:ConflictingAccess
514 fun:g_unix_signal_watch*
517 g-unix-signals-other-helgrind
519 fun:g_unix_signal_watch*
522 g-unix-signals-handler
523 drd:ConflictingAccess
524 fun:g_unix_signal_handler*
527 g-unix-signals-handler-helgrind
529 fun:g_unix_signal_handler*
532 g-unix-signals-worker
533 drd:ConflictingAccess
537 g-unix-signals-worker-helgrind
544 drd:ConflictingAccess
546 fun:g_wakeup_acknowledge
551 drd:ConflictingAccess
552 fun:g_type_fundamental
555 g-type-fundamental-helgrind
557 fun:g_type_fundamental
560 g-type-class-peek-static
561 drd:ConflictingAccess
562 fun:g_type_class_peek_static
565 g-type-class-peek-static-helgrind
567 fun:g_type_class_peek_static
571 drd:ConflictingAccess
583 g-inet-address-get-type
584 drd:ConflictingAccess
585 fun:g_inet_address_get_type
588 g-inet-address-get-type-helgrind
590 fun:g_inet_address_get_type
593 # From: https://github.com/fredericgermain/valgrind/blob/master/glibc-2.X-drd.supp
596 drd:ConflictingAccess
601 drd:ConflictingAccess
606 drd:ConflictingAccess
610 # GSources do an opportunistic ref count check
612 g-source-set-ready-time
613 drd:ConflictingAccess
614 fun:g_source_set_ready_time
617 g-source-set-ready-time-helgrind
619 fun:g_source_set_ready_time
625 fun:g_source_iter_next
627 fun:g_main_context_iterate
631 g-object-instance-private
632 drd:ConflictingAccess
633 fun:*_get_instance_private
636 g-object-instance-private-helgrind
638 fun:*_get_instance_private
641 # GLib legitimately calls pthread_cond_signal without a mutex held
643 g-task-thread-complete
647 fun:g_task_thread_complete
650 g-task-thread-complete
654 fun:g_task_thread_complete
657 # False positive, but I can't explain how (FIXME)
666 # Real race, but is_cancelled() is an opportunistic function anyway
668 g-cancellable-is-cancelled
670 fun:g_cancellable_is_cancelled
679 fun:g_main_context_unref
686 fun:g_source_*_unlocked
691 fun:g_source_*_internal
696 g_object_real_dispose
698 fun:g_object_real_dispose
706 fun:g_object_new_valist
709 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
715 fun:set_str_if_different
719 # g_set_user_dirs() deliberately leaks the previous cached g_get_user_*() values.
725 fun:set_strv_if_different
729 # g_get_system_data_dirs() caches a one-time allocation
731 g_get_system_data_dirs
735 fun:g_build_system_data_dirs
736 fun:g_get_system_data_dirs
739 # g_get_user_data_dir() caches a one-time allocation
745 fun:g_build_user_data_dir
746 fun:g_get_user_data_dir
749 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
751 desktop_file_dirs_malloc
755 fun:desktop_file_dirs_lock
758 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
760 desktop_file_dirs_realloc
764 fun:desktop_file_dirs_lock
767 # gdesktopappinfo.c caches a one-time allocation global table of @desktop_file_dirs.
769 desktop_file_dir_unindexed_setup_search
773 fun:desktop_file_dir_unindexed_setup_search
774 fun:desktop_file_dir_unindexed_setup_search
777 # g_io_extension_point_register() caches a one-time allocation global table of @extension_points.
779 g_io_extension_point_register
783 fun:g_io_extension_point_register
786 # g_strerror() caches a one-time allocation global table of @errors.
796 # g_socket_connection_factory_register_type() caches a one-time allocation global table of @connection_types.
798 g_socket_connection_factory_register_type
802 fun:g_socket_connection_factory_register_type
805 # g_dbus_error_quark() never unregisters itself as a GDBusError domain, as it’s always available
811 fun:g_dbus_error_register_error_domain
812 fun:g_dbus_error_quark
815 # Thread-private data allocated once per thread
821 fun:g_private_set_alloc0
824 g_private_set_alloc0-calloc
828 fun:g_private_set_alloc0
831 # Thread-private GMainContext stack
833 g_main_context_push_thread_default
838 fun:g_main_context_push_thread_default
841 # One-time allocations for #GFileInfo attribute cache
843 g_file_info_attribute_cache
847 fun:ensure_attribute_hash
852 g_file_info_attribute_cache2
856 fun:ensure_attribute_hash
861 g_file_info_attribute_cache3
870 g_file_info_attribute_cache4