bugThe FreeType Project - Bugs: bug #20581, freetype 2.3.5 sefgaults when...

 
 

bug #20581: freetype 2.3.5 sefgaults when running fc-cache with 'wqy-bitmapfont-ttf' installed

Submitted by:  None
Submitted on:  Wed 25 Jul 2007 12:23:16 AM UTC  
 
Severity: 3 - NormalItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 02 Aug 2008 02:11:38 PM UTC, comment #5:

Thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Thu 31 Jul 2008 10:52:10 AM UTC, comment #4:

I can not reproduce the issue with 2.3.7, so you can close this one.

VOROSKOI Andras <voroskoi>
Wed 25 Jul 2007 09:33:20 PM UTC, comment #3:

I can try to do that tomorrow and let you know.

Anonymous
Wed 25 Jul 2007 09:25:39 PM UTC, comment #2:

I'm abroad currently so I can't verify the problem.
Can you trigger the crash with one of the programs from
the ft2demos bundle?

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 25 Jul 2007 12:30:54 AM UTC, comment #1:

Damn forgot to login =)

Gabriel C <cray>
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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by voroskoi (Posted a comment)
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by cray (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 02 Aug 2008 02:11:38 PM UTCwlStatusNeed Info=>Fixed
      Assigned tofreetype=>wl
      Open/ClosedOpen=>Closed
    Sun 05 Aug 2007 04:45:37 AM UTCwlStatusNone=>Need Info
    Wed 25 Jul 2007 09:25:39 PM UTCwlAssigned toNone=>freetype

    Back to the top


    Powered by Savane 3.1-cleanup1