On Fri, 2005-07-15 at 10:29 -0700, Carl Worth wrote:> I just noticed that FcFini is no longer cleaning up all memory, (it''s > not leaking, just still holding on to a static hash table). > > Here''s a patch that seems to clean it all up. OK to commit?Looks fine to me. -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20050715/aa2b7e1a/attachment.pgp
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20050715/a7a703c6/attachment.pgp
Carl Worth wrote:> I just noticed that FcFini is no longer cleaning up all memory, (it''s > not leaking, just still holding on to a static hash table). Valgrind > will show the problem if given --show-reachable=yes with the following > fairly simple program:Hi Carl, Your patch seems to now be causing memory corruption problems. I''m not quite sure why this is the case. Can you take a look at it? I''ve actually cloned it: FcObjectStaticNameFini has moved to fcname.c and has been copied to FcStrStaticNameFini. Here''s what valgrind says: ==18539== Invalid read of size 4 ==18539== at 0x1B9203DD: FcPatternFini (fcpat.c:1325) ==18539== by 0x1B91A1AD: FcFini (fcinit.c:119) ==18539== by 0x8048B3D: main (fc-list.c:162) ==18539== Address 0x1BBDAEA4 is 12 bytes inside a block of size 15 alloc''d ==18539== at 0x1B8FF8A6: malloc (vg_replace_malloc.c:149) ==18539== by 0x1B920166: FcStrStaticName (fcpat.c:1301) ==18539== by 0x1B91B9E1: FcObjectSetAdd (fclist.c:70) ==18539== by 0x1B91BC59: FcObjectSetBuild (fclist.c:119) ==18539== by 0x8048B61: main (fc-list.c:138) pat