Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i386 inline asm version of SDL_revcpy is broken #459

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

i386 inline asm version of SDL_revcpy is broken #459

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 1.2.13
Reported for operating system, platform: Linux, x86

Comments on the original bug report:

On 2009-02-13 02:27:54 +0000, Hans de Goede wrote:

The inline asm version of SDL_revcpy sets the reverse direction flag using the std instruction, but does not clear it afterwards (it does not issue the cld instruction at the end of the inline asm). Or so I've been told, my asm isn't all that good.

This causes crashes when programs use memset after having done SDL calls which use SDL_revcpy internally. See for example of a crash caused by this:
https://bugzilla.redhat.com/show_bug.cgi?id=484121

For a detailed analysis of this crash including the conclusion that the missing "cld" is the cause see:
https://bugzilla.redhat.com/show_bug.cgi?id=484362

I've done a compile of SDL-1.2.13 with the inline version of SDL_revcpy disabled and that fixes the (reproducable) crash. I've not written a patch for this though, as I'm no good with asm.

On 2009-09-13 16:33:13 +0000, Ryan C. Gordon wrote:

Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.

On 2009-09-14 10:43:05 +0000, Patrice Mandin wrote:

*** Bug 536 has been marked as a duplicate of this bug. ***

On 2009-09-17 04:54:09 +0000, Rene Dudfield wrote:

From the mailing list... this has been fixed.

'Fixed in svn revision # 3535 for the 1.2 branch, and # 3536 for the 1.3
branch!'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant