[Pixman] Pixbuf/rpixbuf paths crash

Siarhei Siamashka siarhei.siamashka at gmail.com
Sat Mar 2 19:14:07 PST 2013


On Fri, 1 Mar 2013 13:14:54 +0100
"Nemanja Lukic" <nemanja.lukic at rt-rk.com> wrote:

> Adding following to lowlevel-blt-bench:
> 
>  
> 
>     { "pixbuf",             PIXMAN_pixbuf,          0, PIXMAN_OP_SRC,
> PIXMAN_pixbuf,       0, PIXMAN_a8r8g8b8 },
> 
>     { "rpixbuf",            PIXMAN_rpixbuf,         0, PIXMAN_OP_SRC,
> PIXMAN_rpixbuf,      0, PIXMAN_a8r8g8b8 },
> 
>  
> 
> causes lowlevel-blt-bench to crash (segfault). Actual crashing point is in
> pixman-bits-image.c in function bits_image_fetch_untransformed_repeat_none.
> 
> Both image->fetch_scanline_float and image->fetch_scanline_32 are zero,
> causing program to crash.

PIXMAN_pixbuf and PIXMAN_rpixbuf are fake formats, which are not
exposed in the public API. It is undefined what happens when one
passes them to pixman_image_composite() function.

> How to profile performance of pixman for this colorspace using
> lowlevel-blt-benchmark?
> 
> Did I construct these two testcases correctly?

Not quite. The "pixbuf" fast paths are taken when both source and mask
images are sharing the same buffer. Have a look at:

    http://cgit.freedesktop.org/pixman/tree/pixman/pixman.c?id=pixman-0.29.2#n614

There is also a somewhat practical usage example at:

    http://lists.freedesktop.org/archives/pixman/2011-February/001024.html

-- 
Best regards,
Siarhei Siamashka


More information about the Pixman mailing list