Bug 4163 - Segmentation-fault when rendering empty line with italic font
Summary: Segmentation-fault when rendering empty line with italic font
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: freetype font backend (show other bugs)
Version: 0.9.3
Hardware: x86 (IA32) Linux (All)
: high critical
Assignee: Owen Taylor
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-20 16:47 UTC by Mathias Hasselmann
Modified: 2005-08-22 00:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Backtrace of the crash. (4.65 KB, text/plain)
2005-08-20 16:48 UTC, Mathias Hasselmann
Details
The offending code. (1.21 KB, text/plain)
2005-08-20 16:49 UTC, Mathias Hasselmann
Details
The bugfix suggested by Owen (566 bytes, patch)
2005-08-20 16:55 UTC, Mathias Hasselmann
Details | Splinter Review

Description Mathias Hasselmann 2005-08-20 16:47:19 UTC
Detected by playing with the Cairo backend of Pango: Cairo crashes in
_cairo_pattern_init_for_surface called from
_cairo_ft_unscaled_font_create_glyph, when rendering empty lines with some
italic font.

Crash disappears when assigning a language to the pango context.

Fix is a one-liner accordingly to Owen:

    if (unscaled->have_shape &&
	(unscaled->face->face_flags & FT_FACE_FLAG_SCALABLE) == 0)
	status = _transform_glyph_bitmap (val);

in _cairo_ft_unscaled_font_create_glyph needs a "&& val->image".
Comment 1 Mathias Hasselmann 2005-08-20 16:48:49 UTC
Created attachment 2946 [details]
Backtrace of the crash.
Comment 2 Mathias Hasselmann 2005-08-20 16:49:23 UTC
Created attachment 2947 [details]
The offending code.
Comment 3 Mathias Hasselmann 2005-08-20 16:55:08 UTC
Created attachment 2948 [details] [review]
The bugfix suggested by Owen
Comment 4 Mathias Hasselmann 2005-08-21 03:05:30 UTC
Forget to mention: Your bugfix works for me.
Comment 5 Owen Taylor 2005-08-21 08:06:20 UTC
2005-08-21  Owen Taylor  <otaylor@redhat.com>

        * src/cairo-ft-font.c (_cairo_ft_unscaled_font_create_glyph):
        Don't try to transform val->image when it is NULL.
        (#4163, Mathias Hasselmann)
Comment 6 Carl Worth 2005-08-22 17:15:06 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.