xserver/exa
Éric Piel 7e8f100121 exa: fix ExaCheckCopyNtoN for exa_classic when source = dest
In case you want to copy a region with source = dest, you have the same pixmap
as source and dest.

At the end of exaPixmapIsOffscreen_classic() the devPrivate.ptr is reset to
NULL (look at the sources).

Now this is what happens in ExaCheckCopyNtoN:

exaPrepareAccess( pDst );
   Calls IsOffscreen()
      sets devPrivate.ptr to NULL
   sets up devPrivate.ptr to real pointer
   Everything OK
exaPrepareAccess( pSrc );
   Calls IsOffscreen()
      sets devPrivate.ptr to NULL
   BAILS OUT CAUSE OF NESTED OPERATION SINCE DST EQUALS SRC

We end up with devPrivate.ptr as NULL, and that is clearly wrong.

In particular this fixes a segfault when using the psb driver (bug 28077)

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-11 09:16:32 -07:00
..
Makefile.am exa: A simple 3rd backend implementation. 2009-08-06 23:48:14 +02:00
exa.c Fix exa_priv.h declarations of privates 2010-06-05 21:12:41 -07:00
exa.h exa: s/PixmapIsOffscreen/PixmapHasGpuCopy and s/pExaPixmap->offscreen/pExaPixmap->use_gpu_copy 2009-11-28 12:44:58 -08:00
exa_accel.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
exa_classic.c exa: fix ExaCheckCopyNtoN for exa_classic when source = dest 2010-06-11 09:16:32 -07:00
exa_driver.c exa: check for NULL pointer before dereferences it 2010-04-21 18:06:59 +03:00
exa_glyphs.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
exa_migration_classic.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
exa_migration_mixed.c EXA/mixed: Clean up exaPrepareAccessReg_mixed() a little. 2010-02-17 23:22:36 -08:00
exa_mixed.c Remove more superfluous if(p) checks around free(p) 2010-06-06 20:27:18 +07:00
exa_offscreen.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
exa_priv.h Fix exa_priv.h declarations of privates 2010-06-05 21:12:41 -07:00
exa_render.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
exa_unaccel.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00