CopyArea : bug if areas overlap
Adam Jackson
ajax at nwnk.net
Thu Feb 4 07:44:03 PST 2010
On Thu, 2010-02-04 at 15:50 +0100, rixed at happyleptic.org wrote:
> There is a fastpath in fbBlt() using memcpy if the source and dest rasters are
> properly aligned. This fastpath rely on MEMCPY_WRAPPED, which is (sometime) a
> mere memcpy().
>
> So, if the rasters do overlap the behavior is undefined. On my loongson (mips)
> at home, it segfaults, bus error or sometime hangs.
>
> This is easy to replace this memcpy by a memmove to solve this bug, but I
> wonder if these rasters are actually allowed to overlap ? If not, then the bug
> happens earlier. That's a long time since I programmed for X11 but based on
> XCopyArea manpage I would say it's OK to overlap, so memcpy really should be
> memmove.
>
> What do you think ?
Yeah, probably.
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20100204/0ca91795/attachment.pgp>
More information about the xorg
mailing list