| Summary: | Crash in SDL_UnlockYUVOverlay with smpeg | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Anton Yarth <llancelot7> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | icculus, llancelot7 |
| Version: | 1.2.14 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | App for demonstration of bug | ||
|
Description
Anton Yarth
2011-08-16 01:59:16 UTC
On files with resolution 320x172 all looks OK Oh, i found bug. This bug steel presents while SDL_ASSEMBLY_ROUTINES is defined. Turning it off gives no errors and crashes. I think it's gcc 4.6.1 optimization problem. hmm, peoples from tests code and answer what sdl use not correct asm code, that cause errors(such as no compilation on gcc 4.6.1 with -O0 flag), and that regression. Created attachment 678 [details]
App for demonstration of bug
With gcc 4.6.1 sdl-code cause this bug until comment #define SDL_ASSEMBLY_ROUTINES 1", and with -O0 optimization it give wrong mmx code. This bug, marked as "bug of sdl" on gcc http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50111 And this bug marked as "bug of sdl" on Archlinux https://bugs.archlinux.org/task/25634 This is fixed in Mercurial: http://hg.libsdl.org/SDL/rev/819e85555d4d Thanks! No appears: ./src/video/SDL_RLEaccel.c: In function ‘SDL_RLEBlit’: ./src/video/SDL_RLEaccel.c:831:5: error: impossible constraint in ‘asm’ .... /*many lines*/ ./src/video/SDL_RLEaccel.c:831:5: error: impossible constraint in ‘asm’ ./src/video/SDL_RLEaccel.c:930:6: error: impossible constraint in ‘asm’ ..../*many lines*/ ./src/video/SDL_RLEaccel.c:930:6: error: impossible constraint in ‘asm’ This bug is happening on Haiku, too: http://buildbot.libsdl.org/builders/sdl-haiku/builds/21/steps/compile/logs/stdio --ryan. (In reply to comment #8) > This bug is happening on Haiku, too: Specifically: the "impossible constraint" error, I mean. Should we just disable the MMX code across the board? --ryan. (In reply to comment #9) > (In reply to comment #8) > > This bug is happening on Haiku, too: > > Specifically: the "impossible constraint" error, I mean. > > Should we just disable the MMX code across the board? > > --ryan. By your patch in mercurial (http://hg.libsdl.org/SDL/rev/739ad55fe50d) not disabled all mmx-code, SDL_yuv_sw.c and SDL_yuv_mmx.c still cause not correct drawning or crashes, because they have mmx-instructions too. And if i try build sdl-1.2 from current(2011-09-13 07:58) mercurial with CFLAGS="-O0 -g" it's now stops on: ./src/video/SDL_blit_A.c: In function ‘BlitRGBtoRGBSurfaceAlpha128MMX’: ./src/video/SDL_blit_A.c:247:3: error: impossible constraint in ‘asm’ ./src/video/SDL_blit_A.c:247:3: error: impossible constraint in ‘asm’ make: *** [build/SDL_blit_A.lo] Error 1 I think we must disable mmx code in all files with blitting. (In reply to comment #10) > By your patch in mercurial (http://hg.libsdl.org/SDL/rev/739ad55fe50d) not > disabled all mmx-code, SDL_yuv_sw.c and SDL_yuv_mmx.c still cause not correct > drawning or crashes, because they have mmx-instructions too. I wasn't trying to disable this code with that patch. --ryan. Screw it, I turned off the rest of the MMX code. Fixed in hg changeset 867c4c3604b7. --ryan. |