[Fontconfig] fontconfig 2.10.91 crashing
pgajdos at suse.cz
pgajdos at suse.cz
Wed Mar 20 07:33:11 PDT 2013
Hi,
with following code
#include <fontconfig/fontconfig.h>
int main(void)
{
FcPattern *pat, *match;
FcResult r;
FcInit();
pat = FcPatternCreate();
FcPatternAddString(pat, FC_FAMILY, "Misc Fixed");
FcConfigSubstitute(0, pat, FcMatchPattern);
FcDefaultSubstitute(pat);
match = FcFontMatch(0, pat, &r);
if (r != FcResultMatch)
return 1;
FcConfigSubstitute(0, match, FcMatchFont);
return 0;
}
I get
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bb8120 in FcPatternObjectPosition (p=0x0, object=12) at
fcpat.c:383
383 FcPatternElt *elts = FcPatternElts(p);
(gdb) bt
#0 0x00007ffff7bb8120 in FcPatternObjectPosition (p=0x0, object=12)
at fcpat.c:383
#1 0x00007ffff7bb81d8 in FcPatternObjectFindElt (p=0x0, object=12) at
fcpat.c:408
#2 0x00007ffff7bb914c in FcPatternObjectGet (p=0x0, object=12, id=0,
v=0x7fffffffdc10) at fcpat.c:846
#3 0x00007ffff7ba167b in FcConfigEvaluate (p=0x611790, p_pat=0x0,
kind=FcMatchFont, e=0x606320) at fccfg.c:965
#4 0x00007ffff7ba19e8 in FcConfigEvaluate (p=0x611790, p_pat=0x0,
kind=FcMatchFont, e=0x606338) at fccfg.c:1022
#5 0x00007ffff7ba26c3 in FcConfigValues (p=0x611790, p_pat=0x0,
kind=FcMatchFont, e=0x606338, binding=FcValueBindingWeak) at
fccfg.c:1306
#6 0x00007ffff7ba306c in IA__FcConfigSubstituteWithPat
(config=0x602010, p=0x611790, p_pat=0x0, kind=FcMatchFont) at
fccfg.c:1600
#7 0x00007ffff7ba35a2 in IA__FcConfigSubstitute (config=0x0,
p=0x611790, kind=FcMatchFont) at fccfg.c:1729
#8 0x0000000000400917 in main ()
It does happen also for "Adobe Courier", but not for "DejaVu Sans" or
"Liberation Sans".
p_pat is NULL and as such is provided to FcPatternObjectGet() as
pattern at fccfg.c:965.
That doesn't happen with 2.10.2.
Thanks,
Petr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20130320/a6ff12ca/attachment.pgp>
More information about the Fontconfig
mailing list