Bug 90984

Summary: Potential _cairo_bentley_ottmann_tessellate_rectangular_traps bug
Product: cairo Reporter: Tom Klein <twointofive>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED MOVED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium CC: twointofive
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: _cairo_bentley_ottmann_tessellate_rectangular_traps patch

Description Tom Klein 2015-06-15 19:16:26 UTC
Created attachment 116523 [details]
_cairo_bentley_ottmann_tessellate_rectangular_traps patch

This is being reported with reference to firefox bug 853889: https://bugzilla.mozilla.org/show_bug.cgi?id=853889

As explained in that bug, using firefox's old version of cairo, there's a bug related to _cairo_bentley_ottmann_tessellate_rectangular_traps:
if more than one trap is passed in then it's guaranteed that the returned traps will have their left edge to the left of their right edge, but if only one trap is passed in then the function always returns without doing anything.

I don't think that bug is reproducible with current cairo code (all current calls to _cairo_bentley_ottmann_tessellate_rectangular_traps appear to be guarded by traps.has_intersections checks, which I think implies more than one trap), but it seems like it's still a potential hole for a future bug, and I see a similar hole in _cairo_bentley_ottmann_tessellate_boxes has been fixed already.
Comment 1 Chris Wilson 2015-06-16 09:50:24 UTC
Looks fine.
Comment 2 GitLab Migration User 2018-08-25 13:39:10 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/118.

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.