[cairo] Segfault at sweep_line_delete on video playback

James Cloos cloos at jhcloos.com
Fri Mar 21 02:31:05 PDT 2014


>>>>> "JC" == James Cloos <cloos at jhcloos.com> writes:

JC> This patch should do what Bryce intended, but appears to trigger:

JC> ,----
JC> | Program received signal SIGSEGV, Segmentation fault.
JC> | _cairo_clip_path_destroy (clip_path=0x0) at cairo-clip.c:91
JC> | 91	    assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&clip_path->ref_count));
JC> `----

My second patch (don't dereference rectangle->left.prev if it is null)
which ends up returning TRUE from sweep_line_delete() also produces that
same assert.

A change probably is required instead in:

_cairo_bentley_ottmann_tessellate_rectangular()

from which sweep_line_delete() is called.

Or perhaps in rectangle_peek_stop(), which creates the rectangle_t in question.

Of course, the existence of assert()s in a library is a bug in itself.

If _cairo_clip_path_destroy() gets a NULL it should just return.

-JimC
--
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6


More information about the cairo mailing list