Follow-up Comment #11, bug #17573 (project wesnoth):
First, thanks Richard for tracking down the source of the problem and
suggesting a fix, although there is a small issue.
Second, I've included code implementing your fix, which works on my machine.
Third, I looked at the memcpy code and the problem is not that it copies
memory forward or backward but that it is now using processor specific memory
copying optimizations. In my case it is doing block page copies which
explains why it was replicating columns of the display and not smearing a
single line. The memcpy code also implements copies below processor specific
thresholds (byte align, word align and page align) with different algorithms.
My point is that your fix works if the byte aligned algorithm copies
backwards and the page aligned as well. It will fail if the processor
specific code parallelizes the block copies, which media optimizations on some
processors would make a good idea on non overlapping memory locations.
A more comprehensive fix would be to pan an entire screen left then check the
result, right then check, up then check and down then check, thereby
exercising all pathways we use on the given processor.
However, the simpler fix works on my machine and doesn't load older
processors. I say use Richard's fix so long as no one complains.
Lastly, I want to point out that the bug is not in memcpy, but in SDL (and
others) using memcpy on overlapping memory locations when an alternative
memmove has been available.
(file #12642)
_______________________________________________________
Additional Item Attachment:
File name: SDL_BlitSurfacePatch.3.patch Size:1 KB
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?17573>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs