TODO
author Sam Lantinga <slouken@libsdl.org>
Thu, 16 May 2013 00:43:22 -0700
changeset 7180 3733e68edbc3
parent 6571 bbf4d53d9e37
permissions -rw-r--r--
Fixed bug 1846 - _allmul implementation in SDL_stdlib.c doesn't clean up the stack

Colin Barrett

I see this manifest itself (VS2012 x86) as:

"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."

in the first call to SDL_GetTicks in my application. The disassembly at the problem line is:

hires_now.QuadPart *= 1000;
00AD0792 push 0
00AD0794 push 3E8h
00AD0799 mov eax,dword ptr [ebp-10h]
00AD079C push eax
00AD079D mov ecx,dword ptr [hires_now]
00AD07A0 push ecx
00AD07A1 call _allmul (0AE7D40h)
00AD07A6 mov dword ptr [hires_now],eax
00AD07A9 mov dword ptr [ebp-10h],edx

Apparently _allmul should be popping the stack but isn't (other similar functions in SDL_stdlib.c - _alldiv and whatnot - DO pop the stack).

A 'ret 10h' at the end of _allmul appears to do the trick
slouken@6251
     1
2.0 release checklist:
slouken@3702
     2
 * http://wiki.libsdl.org/moin.cgi/Roadmap
slouken@3563
     3
slouken@3544
     4
 * See why windows are being rearranged.  Is the shield window not up?
slouken@3544
     5
 * Make sure you can create and show a fullscreen window in one step
slouken@3562
     6
 * Write automated test case for multi-draw APIs
slouken@3690
     7
 * Implement assertion code on iPhone
slouken@3690
     8
 * Add __WINDOWS__ in addition to __WIN32__
mikesart@6568
     9
 * Write test for fullscreen gamma to check X11 colormap handling
slouken@3544
    10
slouken@3632
    11
 * Check 1.2 revisions:
slouken@3632
    12
	3554 - Need to resolve semantics for locking keys on different platforms
slouken@3632
    13
	4874 - Do we want screen rotation?  At what level?
slouken@3632
    14
	4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98
slouken@3632
    15
	4484, 4485 - Verify that SDL's Windows keyboard handling works correctly
slouken@3632
    16
	4865 - See if this is still needed (mouse coordinate clamping)
slouken@3632
    17
	4866 - See if this is still needed (blocking window repositioning)
mikesart@6571
    18