[cairo-bugs] [Bug 74779] New: Segmentation fault when using a complex path for clip and stroke
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Feb 10 10:50:39 CET 2014
https://bugs.freedesktop.org/show_bug.cgi?id=74779
Priority: medium
Bug ID: 74779
Assignee: chris at chris-wilson.co.uk
Summary: Segmentation fault when using a complex path for clip
and stroke
QA Contact: cairo-bugs at cairographics.org
Severity: critical
Classification: Unclassified
OS: Linux (All)
Reporter: jlahd at iki.fi
Hardware: x86-64 (AMD64)
Status: NEW
Version: 1.12.16
Component: image backend
Product: cairo
Created attachment 93749
--> https://bugs.freedesktop.org/attachment.cgi?id=93749&action=edit
Code to reproduce the crash
When a sufficiently complex path, consisting of multiple subpaths, is used both
for clip and for stroke, cairo sometimes crashes in a segmentation fault. The
crash seems to happen in the function active_edges, where in the innermost
do...while loop the "right" variable for some reason gets a NULL value:
Program received signal SIGSEGV, Segmentation fault.
active_edges (polygon=0x7fffffffd440, top=32768, left=0x6b9a80) at
/build/buildd/cairo-1.12.16/src/cairo-polygon-intersect.c:1235
1235 /build/buildd/cairo-1.12.16/src/cairo-polygon-intersect.c: No such file
or directory.
(gdb) where
#0 active_edges (polygon=0x7fffffffd440, top=32768, left=0x6b9a80) at
/build/buildd/cairo-1.12.16/src/cairo-polygon-intersect.c:1235
#1 intersection_sweep (polygon=0x7fffffffd440, num_events=<optimized out>,
start_events=<optimized out>)
at /build/buildd/cairo-1.12.16/src/cairo-polygon-intersect.c:1271
#2 _cairo_polygon_intersect (a=a at entry=0x7fffffffd440,
winding_a=winding_a at entry=0, b=b at entry=0x7fffffffcff0, winding_b=<optimized
out>)
at /build/buildd/cairo-1.12.16/src/cairo-polygon-intersect.c:1466
#3 0x00007ffff7b3812a in clip_and_composite_polygon
(compositor=compositor at entry=0x7ffff7dd8000 <spans.11982>,
extents=extents at entry=0x7fffffffd880,
polygon=polygon at entry=0x7fffffffd440, fill_rule=CAIRO_FILL_RULE_WINDING,
antialias=antialias at entry=CAIRO_ANTIALIAS_DEFAULT)
at /build/buildd/cairo-1.12.16/src/cairo-spans-compositor.c:937
#4 0x00007ffff7b38c77 in _cairo_spans_compositor_stroke
(_compositor=0x7ffff7dd8000 <spans.11982>, extents=0x7fffffffd880,
path=<optimized out>, style=0x7fffffffdc70,
ctm=0x604c70, ctm_inverse=0x604ca0, tolerance=0,10000000000000001,
antialias=CAIRO_ANTIALIAS_DEFAULT)
at /build/buildd/cairo-1.12.16/src/cairo-spans-compositor.c:1074
#5 0x00007ffff7af7974 in _cairo_compositor_stroke (compositor=0x7ffff7dd8000
<spans.11982>, surface=0x6049c0, op=CAIRO_OPERATOR_OVER, source=0x7fffffffdca0,
path=0x604eb8, style=0x7fffffffdc70, ctm=0x604c70,
ctm_inverse=ctm_inverse at entry=0x604ca0, tolerance=0,10000000000000001,
antialias=antialias at entry=CAIRO_ANTIALIAS_DEFAULT,
clip=clip at entry=0x6089f0) at
/build/buildd/cairo-1.12.16/src/cairo-compositor.c:157
#6 0x00007ffff7b07953 in _cairo_image_surface_stroke
(abstract_surface=<optimized out>, op=<optimized out>, source=<optimized out>,
path=<optimized out>,
style=<optimized out>, ctm=<optimized out>, ctm_inverse=0x604ca0,
tolerance=<optimized out>, antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0x6089f0)
at /build/buildd/cairo-1.12.16/src/cairo-image-surface.c:961
#7 0x00007ffff7b3bd42 in _cairo_surface_stroke (surface=0x6049c0,
op=CAIRO_OPERATOR_OVER, source=0x7fffffffdca0, path=0x604eb8,
stroke_style=0x7fffffffdc70,
ctm=0x604c70, ctm_inverse=0x604ca0, tolerance=0,10000000000000001,
antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0x6089f0)
at /build/buildd/cairo-1.12.16/src/cairo-surface.c:2210
#8 0x00007ffff7aff05f in _cairo_gstate_stroke (gstate=0x604b80,
path=path at entry=0x604eb8) at
/build/buildd/cairo-1.12.16/src/cairo-gstate.c:1185
#9 0x00007ffff7af9079 in _cairo_default_context_stroke (abstract_cr=0x604b50)
at /build/buildd/cairo-1.12.16/src/cairo-default-context.c:1013
#10 0x00007ffff7af2875 in INT_cairo_stroke (cr=0x604b50) at
/build/buildd/cairo-1.12.16/src/cairo.c:2146
#11 0x0000000000400b8f in main () at bug.c:28
Can be reproduced reliably with the attached code.
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20140210/e2700746/attachment.html>
More information about the cairo-bugs
mailing list