[Fontconfig] Re: fontconfig often crashes when there is something wrong with the cache files

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

 



Patrick Lam <plam@xxxxxxx> ????????:

> Mike FABIAN wrote:
>> For details see:
>> 
>> http://bugzilla.novell.com/show_bug.cgi?id=128080
>> 
>> This bugreport also has a backtrace attached (comment #10).
>> 
>> Until now I don't know a easy way to reproduce the problem, it occurs
>> "sometimes" and goes away by calling "fc-cache -f" as root.
>> I.e. I guess there is something wrong with the cache files.
>> 
>> I have started debugging this but until now I only found that
>> it crashes in fccharset.c in
>> 
>>     FcCharSet *
>>     FcCharSetCopy (FcCharSet *src)
>>     {
>>         if (src->ref != FC_REF_CONSTANT)
>>             src->ref++;
>>         return src;
>>     }
>> 
>> 
>> when src->ref happens to be 0 (which is != FC_REF_CONSTANT)
>> and then tries to execute
>> 
>>     src->ref++;
>> 
>> which won't work because "src" is v.u.c where v is of type FcValue and
>> FcCharSet is "const" in that union (fontconfig.h), therefore it cannot
>> be incremented:
>
> The constness is not a problem, since that's cast away.  However, the
> problem might be that the charset is in mmapped space and therefore ref
> can't be incremented.  But that's strange, because mmapped charsets
> should always have ref set to -1.  Also, the backtrace seems to point to
>  line 359, which is the statement just after the increment.

The shift of one line is probably because I had added a printf for
debugging somewhere.
When single stepping with gdb, it crashed exactly on the

    src->ref++;

line.

And when that happened, ref was equal to 0.

-- 
Mike FABIAN   <mfabian@xxxxxxx>   http://www.suse.de/~mfabian
?????????????



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

  Powered by Linux