[Fontconfig] Patch to cleanup FcFini

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

 



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


[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux