On Sun, May 10, 2009 at 08:20:09AM +0100, Jeremy Henty wrote:
On Sat, May 09, 2009 at 12:19:17PM -0400, Jorge Arellano Cid wrote:
I've found this:
==9830== 1,420 (352 direct, 1,068 indirect) bytes in 11 blocks are definitely lost in loss record 153 of 192 ==9830== at 0x4025D2E: malloc (vg_replace_malloc.c:207) ==9830== by 0x8081270: dMalloc (dlib.c:36) ==9830== by 0x807E46A: a_Image_new (image.cc:40) ==9830== by 0x80703C5: a_Html_image_new(DilloHtml*, char const*, int, _DilloUrl*) (html.cc:2067) ==9830== by 0x8074F49: _ZL16Html_input_imageP9DilloHtmlPKci (form.cc:1905) ==9830== by 0x8078C5A: Html_tag_open_input(DilloHtml*, char const*, int) (form.cc:484) ==9830== by 0x8071F71: _ZL16Html_process_tagP9DilloHtmlPci (html.cc:3455) ==9830== by 0x80725E8: _ZL14Html_write_rawP9DilloHtmlPcii (html.cc:3756) ==9830== by 0x807276F: DilloHtml::write(char*, int, int) (html.cc:573) ==9830== by 0x8072802: _ZL13Html_callbackiP12_CacheClient (html.cc:3647) ==9830== by 0x8060BC7: Cache_process_queue (cache.c:1154) ==9830== by 0x80603A0: a_Cache_process_dbuf (cache.c:876)
in www.lacuarta.cl
Here are two more that show the same thing. With a vanilla dillo they leak DilloImages. The imgref patch that I attached earlier fixes the leaks.
http://stephenlaw.blogspot.com/2009/05/careful-how-you-use-bogus.html http://www.nybooks.com/articles/22694
I've attached the valgrind logs. The "__0.txt" versions are from the vanilla repo. The others are after applying the imgref patch. No other patches were applied.
I think it's clear that image reference counting is currently broken and the imgref patch, or something like it, is needed to fix it.
Patch reviewed and committed! Now, with this patch, is there any other Image-related problem detected by valgrind? AFAIS, it was made by Johannes, corvid and you? Just to give due credit in the ChangeLog. -- Cheers Jorge.-