[SDL] [Patch] SDL-1.2 SDL_revcpy() asm patch for the cld flag

Marcus von Appen mva at sysfault.org
Sat Feb 2 13:08:05 PST 2008


Hi,

as reported through the FreeBSD bug tracking system in SDL 1.2.13 (and
in the 1.2 branch, if I see that correctly) the SDL_revcpy() macro sets
the direction flag (std), but does not clear it afterwards (cld), which
is wrong according to the GCC and SYS V specs.  This can cause some
weird side effects, which in turn can lead to memory corruption.

You can read the full report with a detailed description and test
program at http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/120052

Attached is the submitted patch, which fixes the issue.

Regards
Marcus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: std_cld.diff
Type: text/x-diff
Size: 347 bytes
Desc: not available
Url : http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080202/5c88c23c/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080202/5c88c23c/attachment.pgp 


More information about the SDL mailing list