Crash when non-existing directories are referenced in ~/.fonts.cache

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

 



How to reproduce:

Delete global caches and ~/.fonts.cache-2:

    mfabian@magellan:~$ sudo rm -f /var/cache/fontconfig/*
    mfabian@magellan:~$ rm -f .fonts.cache*
    mfabian@magellan:~$

Create ~/.fonts.cache-2 again:

    mfabian@magellan:~$ time fc-match sans 
    hgjgbbmp.ttc: "HGPGothicB" "Regular"

    real	3m55.605s
    user	0m59.556s
    sys	0m2.912s
    mfabian@magellan:~$

Move one directory which has been added to ~/.fonts.cache-2 out
of the way:

    mfabian@magellan:~$ sudo mv /usr/share/fonts /tmp
    mfabian@magellan:~$

~/.fonts.cache-2 now contains references to a
non-existing directory:

    mfabian@magellan:~$ fc-cat .fonts.cache-2 | grep usr/share/fonts
    fc-cat: printing global cache contents for dir /usr/share/fonts/wine
    fc-cat: printing global cache contents for dir /usr/share/fonts/bdf
    fc-cat: printing global cache contents for dir /usr/share/fonts
    mfabian@magellan:~$ 

Try to use a fontconfig application, e.g. "fc-match":

    mfabian@magellan:~$ time fc-match sans
    セグメンテーション違反です (core dumped)

    real	0m16.670s
    user	0m0.024s
    sys	0m0.152s
    mfabian@magellan:~$ 

Crashes.

-- 
Mike FABIAN   <mfabian@xxxxxxx>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

_______________________________________________
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