Bug 669844

Summary: SDL_BlitCopyOverlap assumes memcpy operates in order while SSE3 version operates from back to front
Product: [Fedora] Fedora Reporter: Pauli <suokkos>
Component: SDLAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: ppisar, twoerner, yaroslav.sapozhnik
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: SDL-1.2.14-10.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 678569 (view as bug list) Environment:
Last Closed: 2011-03-03 03:26:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 678818    
Bug Blocks:    
Attachments:
Description Flags
Fix overlapping memcpy in SDL_BlitCopyOverlap
suokkos: review?
Fix from upstream none

Description Pauli 2011-01-14 23:47:50 UTC
Description of problem:
Scrolling to right in Battle of Wesnoth causes visual corruption because SSE3 memcpy operates from end to begin

Version-Release number of selected component (if applicable):
1.2.14

How reproducible:
Scroll right in game view in battle of wesnoth
  
Actual results:
Map area gets corrupted

Expected results:
Scrolling works correctly

Additional info:
I guess simple switching SDL_memcpy to memmove would fix the problem even tough that would add one extra branch for each line that is copied. But in end switching both branches to use simple memmove would be big gain as C library would have CPU specific optimizations that are missing from SDL.

Comment 1 Pauli 2011-01-17 10:13:20 UTC
Created attachment 473802 [details]
Fix overlapping memcpy in SDL_BlitCopyOverlap

Attached patch fixes the problem for me.

Comment 2 Petr Pisar 2011-02-18 12:05:36 UTC
Created attachment 479490 [details]
Fix from upstream

Comment 3 Fedora Update System 2011-02-18 13:05:39 UTC
SDL-1.2.14-10.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/SDL-1.2.14-10.fc15

Comment 4 Fedora Update System 2011-02-18 13:06:12 UTC
SDL-1.2.14-9.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/SDL-1.2.14-9.fc14

Comment 5 Fedora Update System 2011-02-18 13:06:27 UTC
SDL-1.2.14-9.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/SDL-1.2.14-9.fc13

Comment 6 Fedora Update System 2011-02-19 01:26:13 UTC
SDL-1.2.14-9.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update SDL'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/SDL-1.2.14-9.fc13

Comment 7 Fedora Update System 2011-02-25 09:59:31 UTC
SDL-1.2.14-11.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/SDL-1.2.14-11.fc15

Comment 8 Fedora Update System 2011-02-25 10:01:48 UTC
SDL-1.2.14-10.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/SDL-1.2.14-10.fc14

Comment 9 Fedora Update System 2011-02-25 10:02:11 UTC
SDL-1.2.14-10.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/SDL-1.2.14-10.fc13

Comment 10 Fedora Update System 2011-03-03 03:26:12 UTC
SDL-1.2.14-11.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2011-03-07 21:00:22 UTC
SDL-1.2.14-10.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2011-03-07 21:01:39 UTC
SDL-1.2.14-10.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.