Bug 51104 - Not initialized status in composite_glyphs
Summary: Not initialized status in composite_glyphs
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.2
Hardware: Other All
: medium critical
Assignee: Jose Dapena Paz
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-15 02:22 UTC by Jose Dapena Paz
Modified: 2012-06-15 03:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Full backtrace (10.29 KB, text/plain)
2012-06-15 02:22 UTC, Jose Dapena Paz
Details
Patch: initialize properly composite_glyphs in image compositor (1.09 KB, patch)
2012-06-15 02:37 UTC, Jose Dapena Paz
Details | Splinter Review

Description Jose Dapena Paz 2012-06-15 02:22:41 UTC
Created attachment 63063 [details]
Full backtrace

I'm getting an assert on running gtk3-demo with wayland:

gtk3-demo: cairo-error.c:68: _cairo_error: Assertion `(status != CAIRO_STATUS_SUCCESS && status < CAIRO_STATUS_LAST_STATUS)' failed.

The relevant part of the backtrace:
#5  0x00007ffff776373d in _cairo_set_error (cr=0x6dc5c0, status=32767) at cairo.c:180
#6  0x00007ffff7765e9e in cairo_show_glyphs (cr=0x6dc5c0, glyphs=0x7fffffffa660, num_glyphs=5) at cairo.c:3317
#7  0x00007ffff7f8d019 in pango_cairo_renderer_show_text_glyphs (renderer=0x750030, text=0x0, text_len=0, glyphs=0x6d79a0, clusters=0x0, num_clusters=0, backward=0, font=0x4971f0, x=8192, y=13312) at pangocairo-render.c:367
#8  0x00007ffff7f8d0a6 in pango_cairo_renderer_draw_glyphs (renderer=0x750030, font=0x4971f0, glyphs=0x6d79a0, x=8192, y=13312) at pangocairo-render.c:383

I'm attaching the full backtrace.

After tracing a bit, the issue is originated by cairo-image-compositor.c:composite_glyphs not initializing cairo_status_t, so it may get a random value.
Comment 1 Jose Dapena Paz 2012-06-15 02:37:20 UTC
Created attachment 63066 [details] [review]
Patch: initialize properly composite_glyphs in image compositor
Comment 2 Chris Wilson 2012-06-15 03:20:47 UTC
commit 35e4ffd91cc73fb17c47a12010f515941d6f4d3d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jun 15 10:52:25 2012 +0100

    image: Fix up glyphs compositing
    
    Jose Dapena Paz reported an assertion following the uninitialised status
    value being returned. Also the function failed to free its allocations.
    
    Based on a patch by Jose Dapena Paz <jdapena@igalia.com>.
    Reported-by: Jose Dapena Paz <jdapena@igalia.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51104
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


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.