[cairo] Bug: Crash in cairo-1.9.8

cu cairouser at yahoo.com
Wed Jun 16 08:42:17 PDT 2010


And more results - the difference is in how
_cairo_fixed_integer_round_down operates, evidently.

With 1.9.6 the values of p1.x and p1.y convert to x1 and x2 like so,
respectively:
0 ffffff80 -> 0 0

With 1.9.8:
0 ffffff80 -> 0 ffffff

I assume the first method is right and the second is not?
_cairo_fixed_integer_round_down seems like a bunch of macros shifting
things around to get to the 24 bit fixed point representation?


cu wrote:
> Good one :)
>
> Here is where this happens:
> cairo-image-surface.c:2893
>       int x1 = _cairo_fixed_integer_round_down (box[i].p1.x);
>       int y1 = _cairo_fixed_integer_round_down (box[i].p1.y);
>       int x2 = _cairo_fixed_integer_round_down (box[i].p2.x);
>       int y2 = _cairo_fixed_integer_round_down (box[i].p2.y);
> From debugger:
> (gdb) p i
> $7 = 0
> (gdb) p box[i].p1.x
> $8 = 0
> (gdb) p box[i].p2.x
> $9 = -128
> (gdb) p x1
> $10 = 0
> (gdb) p x2
> $11 = 16777215
>
> Not sure what these values are or whether they should be this way.
> From there on it probably is gone downhill.
>
> Jonathan Morton wrote:
>   
>> On Wed, 2010-06-16 at 10:53 -0400, cu wrote:
>>   
>>     
>>> #1  0x00000001001435b3 in pixman_fill_sse2 (bits=0x100400000,
>>> stride=4000, bpp=32, x=0, y=280, width=16777215, height=0,
>>> data=4294901760) at pixman-sse2.c:4037
>>>     
>>>       
>> Why is width == 2^24-1?
>>
>>   
>>     
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>   



More information about the cairo mailing list