Re: FontConfig memory question

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

 



On Feb 14, 2014 5:12 PM, "mathog" <mathog@xxxxxxxxxxx> wrote:
>
> On 14-Feb-2014 11:47, mathog wrote:
>>
>> I'm thinking it will probably come down to building a debug version of
>> fontconfig, linking with that, and then tracking a whole lot of
>> pointers.
>
>
>  The bad news: Inkscape still can't run FcFini() just before exit without crashing.

Try:

  pango_cairo_font_map_set_default (NULL);
  cairo_debug_reset_static_data ();
  FcFini ();

(On cell phone.)

behdad
>
> Ran inkscape in valgrind while it was linked with the 2.11 library compiled with -g, and traced a huge number of memory leaks into FcValueSave.  These 3 lines leak when that function is called from numerous locations:
>
>         v.u.s = FcStrdup (v.u.s);
>         v.u.m = FcMatrixCopy (v.u.m);
>         v.u.l = FcLangSetCopy (v.u.l);
>
> but this one doesn't
>
>         v.u.c = FcCharSetCopy ((FcCharSet *) v.u.c);
>
> What is this code trying to do?  Because in general
>
>    sometype var;
>    /* set the values in var */
>    var = duplicate_function(var);
>
> is going to leak if sometype has pointers to memory.  The surprising thing here is not that the 3 lines noted leak, but that FcCharSetCopy doesn't.  FcValueSave is called from 4 locations in fcpat.c, and all of them leaked.  The only other place FcValueSave seemed to be used was in fccfg.c, but that included fcaliastail.h, which redefines FcValueSave so that the function by that name is not called.
>
> Regards,
>
>
> David Mathog
> mathog@xxxxxxxxxxx
> Manager, Sequence Analysis Facility, Biology Division, Caltech
> _______________________________________________
> Fontconfig mailing list
> Fontconfig@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/fontconfig

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

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

  Powered by Linux