Wed 25 Jul 2007 12:23:16 AM UTC, original submission:
Hi,
I get an odd segfault with 2.3.5.
Looks like wqy-bitmapfont-ttf (http://sourceforge.net/project/showfiles.php?group_id=128192) triggers the bug.
Removing the fonts from system makes freetype and fontconfig happy again.
BTW reverting this commit :
http://cvs.savannah.nongnu.org/viewvc/freetype2/src/truetype/ttgload.c?root=freetype&r1=1.187&r2=1.188
makes freetype and fontconfig happy again too with the fonts installed.
Here the back trace.
crazy@lara:/work/crazy/current/source/lib/fontconfig$ sudo gdb fc-cache
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run -vfs
Starting program: /usr/bin/fc-cache -vfs
/usr/share/fonts: caching, 0 fonts, 1 dirs
/usr/share/fonts/override: caching, 0 fonts, 0 dirs
/usr/lib/X11/fonts: caching, 0 fonts, 10 dirs
/usr/lib/X11/fonts/100dpi: caching, 398 fonts, 0 dirs
/usr/lib/X11/fonts/75dpi: caching, 406 fonts, 0 dirs
/usr/lib/X11/fonts/OTF: caching, 23 fonts, 0 dirs
/usr/lib/X11/fonts/Speedo: caching, 0 fonts, 0 dirs
/usr/lib/X11/fonts/TTF:
Program received signal SIGSEGV, Segmentation fault.
0xb7e78e6e in TT_Load_Simple_Glyph (load=0xbfcfc62c) at /work/crazy/current/source/lib/freetype2/src/freetype-2.3.5/src/truetype/ttgload.c:270
270 cont[0] = prev_cont = FT_NEXT_USHORT( p );
(gdb)
(gdb) bt
#0 0xb7e78e6e in TT_Load_Simple_Glyph (load=0xbfcfc62c) at /work/crazy/current/source/lib/freetype2/src/freetype-2.3.5/src/truetype/ttgload.c:270
#1 0xb7e7aa83 in load_truetype_glyph (loader=0xbfcfc62c, glyph_index=33985, recurse_count=0)
at /work/crazy/current/source/lib/freetype2/src/freetype-2.3.5/src/truetype/ttgload.c:1286
#2 0xb7e7b88e in TT_Load_Glyph (size=0x805a0c8, glyph=0x80d4d70, glyph_index=33985, load_flags=523)
at /work/crazy/current/source/lib/freetype2/src/freetype-2.3.5/src/truetype/ttgload.c:1923
#3 0xb7e780a2 in Load_Glyph (ttslot=0x80d4d70, ttsize=0x805a0c8, glyph_index=33985, load_flags=523)
at /work/crazy/current/source/lib/freetype2/src/freetype-2.3.5/src/truetype/ttdriver.c:269
#4 0xb7e68c3e in FT_Load_Glyph (face=0x8126d08, glyph_index=33985, load_flags=523) at /work/crazy/current/source/lib/freetype2/src/freetype-2.3.5/src/base/ftobjs.c:646
#5 0xb7ef9440 in FcFreeTypeCheckGlyph (face=0x8126d08, ucs4=65507, glyph=33985, blanks=0x8053f68, advance=0xbfcfc8b4) at fcfreetype.c:2462
#6 0xb7ef982f in IA__FcFreeTypeCharSetAndSpacing (face=0x8126d08, blanks=0x8053f68, spacing=0xbfcfc990) at fcfreetype.c:2592
#7 0xb7ef88aa in IA__FcFreeTypeQuery (file=0x80b1378 "/usr/lib/X11/fonts/TTF/wqy-bsong-bold.ttf", id=0, blanks=0x8053f68, count=0xbfcfca54) at fcfreetype.c:1615
#8 0xb7ef6572 in FcFileScanFontConfig (set=0x80e86d0, blanks=0x8053f68, file=0x80b1378 "/usr/lib/X11/fonts/TTF/wqy-bsong-bold.ttf", config=0x804c008) at fcdir.c:61
#9 0xb7ef66d4 in FcFileScanConfig (set=0x80e86d0, dirs=0x80f22b0, blanks=0x8053f68, file=0x80b1378 "/usr/lib/X11/fonts/TTF/wqy-bsong-bold.ttf", config=0x804c008) at fcdir.c:109
#10 0xb7ef6979 in FcDirCacheScan (dir=0x80515a0 "/usr/lib/X11/fonts/TTF", config=0x804c008) at fcdir.c:216
#11 0xb7ef6a6a in IA__FcDirCacheRead (dir=0x80515a0 "/usr/lib/X11/fonts/TTF", force=1, config=0x804c008) at fcdir.c:263
#12 0x080492e4 in scanDirs (list=0x80525b0, config=0x804c008, force=1, really_force=0, verbose=1) at fc-cache.c:216
#13 0x080494ca in scanDirs (list=0x8055828, config=0x804c008, force=1, really_force=0, verbose=1) at fc-cache.c:267
#14 0x08049ae0 in main (argc=2, argv=0xbfcfcd74) at fc-cache.c:469
(gdb) l *0xb7e78e6e
0xb7e78e6e is in TT_Load_Simple_Glyph (/work/crazy/current/source/lib/freetype2/src/freetype-2.3.5/src/truetype/ttgload.c:270).
265
266 /* check space for contours array + instructions count */
267 if ( n_contours >= 0xFFF || p + ( n_contours + 1 ) * 2 > limit )
268 goto Invalid_Outline;
269
270 cont[0] = prev_cont = FT_NEXT_USHORT( p );
271 for ( cont++; cont < cont_limit; cont++ )
272 {
273 cont[0] = FT_NEXT_USHORT( p );
274 if ( cont[0] <= prev_cont )
Ping me if you need more infos.
Regards ,
Gabriel C
|