CopyArea : bug if areas overlap

2010-02-04 Thread rixed
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

Re: CopyArea : bug if areas overlap

2010-02-04 Thread Adam Jackson
On Thu, 2010-02-04 at 15:50 +0100, ri...@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.

Re: CopyArea : bug if areas overlap

2010-02-04 Thread Soeren Sandmann
ri...@happyleptic.org writes: 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,

Re: CopyArea : bug if areas overlap

2010-02-04 Thread rixed
-[ Thu, Feb 04, 2010 at 10:44:03AM -0500, Adam Jackson ] Yeah, probably. So you fix it ? Or maybe that's better to check for overlap in fbBlt so that we still use memcpy which should be faster, avoiding the fastpath when src and dest overlap ? ___