Install Valgrind suppressions file
Like GLib does, GTK should install a suppressions file for Valgrind.
As an example to get started with, I need the following suppressions for a minimal GTK 3.22 program that creates and immediately destroys a GtkWindow
:
{
gtk-style-context
Memcheck:Leak
match-leak-kinds: possible
fun:malloc
fun:g_malloc
...
fun:gtk_css_node_declaration_make_writable
...
fun:gtk_style_constructed
}
{
gtk-style-context2
Memcheck:Leak
match-leak-kinds: possible
fun:malloc
fun:g_malloc
...
fun:gtk_css_node_declaration_make_writable_resize
...
fun:gtk_style_constructed
}
(Unless this is an actual memory leak, in which case the nature of this bug report changes quite a bit!)