15

I have an application that uses GTK+ and Glade; running Valgrind with the memcheck tool outputs about 2,000 errors. Does anyone have a good suppression file they can share for GTK applications?

I tried these, but each still leaves me with ~900 errors:

A copy of the code I'm working with can be found here. Do make run to build the GUI (there is nothing but the GUI in this copy of the code).

unwind
  • 391,730
  • 64
  • 469
  • 606
Nate Glenn
  • 6,455
  • 8
  • 52
  • 95
  • Look here: https://wiki.gnome.org/Valgrind and (on ubuntu) use suppression file `/usr/share/glib-2.0/valgrind/glib.supp` – DarkTrick Jul 15 '21 at 19:19

2 Answers2

2

Try this, worked for me: http://lug.rose-hulman.edu/code/projects/grits/repository/revisions/master/raw/src/gtk.suppression

I've uploaded my modified version here: paste.org/47748

Here's my valgrind command line, but I think setting G_SLICE and G_DEBUG doesn't help as much as editing the suppressions file:

valgrind --tool=memcheck --leak-check=full --num-callers=15 --suppressions=gtk.supp --log-file=vgdump ./runner
Denis Gorodetskiy
  • 2,884
  • 3
  • 21
  • 23
1

You may already have seen it as you use the GTK suppression file from Johan Dahlin, but there's a page about Valgrind and GTK on the GNOME wiki.

DarkTrick
  • 2,447
  • 1
  • 21
  • 39
liberforce
  • 11,189
  • 37
  • 48