Crash occurs if I move a cursor to the line 'Name[dz]=...'. And
it seems the font I use cannot display the 'dz' language.
I use cairo commit '1d788da5175dac34ed0298204753bf1b40dfc2b0' to get
Here is a gdb backtrace:
/home2/namsh/c/vim/src$ LD_PRELOAD=./libcairo.so.2.11.5 gdb ./vim
GNU gdb Red Hat Linux (6.5-7_nshrh)
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 "athlon-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run -g -f gaim.desktop
Starting program: /home2/namsh/c/vim/src/vim -g -f gaim.desktop
[Thread debugging using libthread_db enabled]
[New process 15897]
[New Thread -1220254016 (LWP 15897)]
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread -1220254016 (LWP 15897)]
0xb7ef1ae6 in _get_bitmap_surface (bitmap=0x8889924, own_buffer=0,
font_options=0x88cfd80, surface=0xbf8257b4) at cairo-ft-font.c:745
745 data = _cairo_malloc_ab (height, stride);
(gdb) p height
$1 = 0
(gdb) p stride
$2 = 0
The program is running. Exit anyway? (y or n) y
Created attachment 11423 [details] [review]
Special case zero-sized bitmaps.
This hides the FPE in the malloc macro, but it neatly avoids the malloc(0).
I verified the patch in Comment #1.
Indeed it avoids the crash.
Author: Chris Wilson <email@example.com>
Date: Wed Sep 5 08:07:41 2007 +0100
[cairo-ft-font] Early detection of a zero sized bitmap.
Under rare circumstances we may need to extract a surface that
represents a bitmap with width==0 and rows==0. Detect this case at the
start and simply return a zero-sized surface.