[cairo] fixed_from_double speedup masking pixman traps problem
Daniel Amelang
daniel.amelang at gmail.com
Tue Nov 21 10:52:22 PST 2006
On 11/21/06, Bogdan Nicula <bogdanni at hotmail.com> wrote:
>
> >I should have mentioned that the old version of fixed_from_double
> >overflowed just as 'easily' as the new one does. The difference is
> >that the result of the overflow is different, which what Vlad meant by
> >"we're getting different bogus values."
>
> Of course I knew this.
Yea, sorry. At 12 midnight it seemed insightful, but at 10:30am the
morning after, it's now painfully obvious.
> May be it still is preferable to stop on overflow here rather than
> continuing with "bogus values", potentially corrupting memory. Remember,
> cairo is critical infrastructure.
I think we all agree on this. The question (in my mind) is whether the
error checking should go inside the function or not. Since there are
only a few cases where the overflow could result in corrupted memory,
I vote that we check for overflow in those places, not in the general
function.
Dan
More information about the cairo
mailing list