[cairo] PATCHES for FPERR crashes during spline rendering

John Ellson ellson at research.att.com
Wed Jun 22 17:53:59 PDT 2005


Here are two patches that I've found necessary to avoid SIGFPEs when 
rendering curves
for graphviz.    I've tried and failed to generate simple test cases 
that trigger the faults, but with
graphviz they happen almost immediately.   With the patches applied
I get no faults in cairo for all our 50 or so test graphs.

The problem in cairo-matrix.c is with attempts to take sqrt of negative 
values.  The fix clamps the result to zero.

The problem in cairo-fixed.c is from overflows during double->fixed 
conversion.  The fix clamps the result to max value
of the correct sign.


John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-matrix.c.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050622/b117d7a8/cairo-matrix.c.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-fixed.c.patch
Type: text/x-patch
Size: 377 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050622/b117d7a8/cairo-fixed.c.bin


More information about the cairo mailing list