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

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

 



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:

    typedef struct _FcValue {
        FcType	type;
        union {
            const FcChar8  *s;
            int             s_off;
            int		i;
            FcBool		b;
            double		d;
            const FcMatrix  *m;
            const FcCharSet *c;
            int		c_off;
            void		*f;
            const FcPattern	*p;
            const FcLangSet *l;
            int		l_off; // this is a difference of char *s
        } u;
    } FcValue;


-- 
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