[cairo] PATCHES for FPERR crashes during spline rendering

John Ellson ellson at research.att.com
Wed Aug 3 07:18:04 PDT 2005

John Ellson wrote:

> 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.

I've just updated https://bugs.freedesktop.org/show_bug.cgi?id=2675
with a simple code example illustrating the cairo-fixed.c problem.

The bug is only visible when you have FPU exceptions enabled.

I'll try to work up another example for the cairo-matrix.c case.


More information about the cairo mailing list