Re: has anyone valgrind'd gtk?



I've tied this, and also G_DEBUG=gc-friendly

The reality is that gtk is leaking.

it's not just a matter of there being a pointer that wasn't cleared.
valgrind is reporting actual malloced memory that hasn't been freed.

==9422== LEAK SUMMARY:
==9422==    definitely lost: 5,318 bytes in 35 blocks.
==9422==    indirectly lost: 8,760 bytes in 432 blocks.
==9422==      possibly lost: 800 bytes in 20 blocks.
==9422==    still reachable: 2,065,986 bytes in 21,540 blocks.

I've loaded a bunch of debuginfo rpms (FC-6), and this is what i'm seeing:

pango leaks from gtk_label_size_request that have never been freed

g_signal_newv() from within a g_object_new() from within a gtk_window_new()
isn't freed.

alot of the pango stuff (mostly called from within the gtk_label stuff, or from
within the gtk_text stuff) not being freed.

the gtk_icon stuff seems to have a lot of unfreed memory as well.

these are all small leaks, but there are alot of them, and they add up. :)

there are worse ones in the them/icon stuff

 18,630 bytes in 1,080 blocks are still reachable in loss record 6,054 of 6,063
 69,120 bytes in 1,080 blocks are still reachable in loss record 6,059 of 6,063

The worse ones are from the freetype library, called from pango, from
gtk_text_layout:

 131,070 bytes in 2 blocks are still reachable in loss record 6,060 of 6,063
 131,070 bytes in 2 blocks are still reachable in loss record 6,061 of 6,063
 337,656 bytes in 94 blocks are still reachable in loss record 6,062 of 6,063
 
I'm going to start tracking some of these down.

My REAL QUESTION(s) are who do I report fixes to? (quickly backed up by: if I
need help understanding what's going on, and specifically, why something isn't
being freed in the first place, who do i ask) ?

-Greg

On 03-Dec-2006 Hans Petter Jansson wrote:
> On Sun, 2006-12-03 at 14:11 +0000, Ross Burton wrote:
> 
>> GTK+ internally uses GSlice, which means you'll see lots of fake leaks.
>> Set G_SLICE=always-malloc when starting valgrind, and they'll probably
>> disappear.
> 
> It's a good idea to use G_DEBUG=gc-friendly too, especially if you're
> looking for leaks.
> 
> -- 
> Hans Petter
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list

+---------------------------------------------------------------------+

Please also check the log file at "/dev/null" for additional information.
                (from /var/log/Xorg.setup.log)

| Greg Hosler                                   greg hosler per sg    |
+---------------------------------------------------------------------+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]