| Summary: | signal SIGSEGV SDL_UpperBlit () | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Trent <siriustrent> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sylvain.becker |
| Version: | 1.2.14 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
| Attachments: | source code | ||
I have checked this one. It can be closed as the test case is bugged. the img[] array is access out of bounds. (2704). Hence the SIGSEV. Making img[] as 2800 solves the issue and the test case works : the large surface is correctly created. Thanks for checking this, Sylvain! |
Created attachment 977 [details] source code This bug appear with a SDL_Surface **x; and SDL_BlitSurface x[i] on a large surface (saving a map). Pseudo code : SDL_Surface *srf,*x[2800]; for(i=0;i<2800;i++){ x[i]=SDL_LoadBMP("bk.bmp"); SDL_BlitSurface(x[i],NULL,srf,&pos); } SDL_SaveBMP(srf,"0.bmp"); Bug does not appear using a unique SDL_Surface *x; SDL_Surface *srf,*x; x=SDL_LoadBMP("bk.bmp"); for(i=0;i<2800;i++){ SDL_BlitSurface(x,NULL,srf,&pos); } SDL_SaveBMP(srf,"0.bmp"); -- SDL.dll version 1.2.14 Program received signal SIGSEGV, Segmentation fault. 0x681247d8 in SDL_UpperBlit () from C:\Users\Trent\test2\SDL.dll (gdb) bt #0 0x681247d8 in SDL_UpperBlit () from C:\Users\Trent\test2\SDL.dll #1 0x00401432 in SDL_main (argc=1, argv=0x542da0) at _debug.c:18 #2 0x004024c9 in console_main (argc=1, argv=0x542da0) at ./src/main/win32/SDL_win32_main.c:315 #3 0x0040258b in WinMain@16 (hInst=0x400000, hPrev=0x0, szCmdLine=0x723bea "", sw=10) at ./src/main/win32/SDL_win32_main.c:398 #4 0x00401bd6 in main ()