We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1307

Summary: long long multiplication causes error
Product: SDL Reporter: luz <devluz>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.0   
Hardware: x86_64   
OS: Windows 7   
See Also: http://bugzilla.libsdl.org/show_bug.cgi?id=1846

Description luz 2011-09-20 12:28:12 UTC
version: 1.3.0-5605 (from http://www.libsdl.org/tmp/SDL-1.3.zip)

Error of Visual Studio Debugger:
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.


example code:

void anyFunction
{
   unsigned long long k = 1;
   unsigned long long ksq = k * k ;
}

It seems that the function
void
__declspec(naked)
_allmul()

in SDL_stdlib.c destroy the stack.
Comment 1 Sam Lantinga 2012-01-07 21:32:55 UTC
Can you attach a full project that shows the problem?  I just tried to reproduce this and wasn't able to.

Thanks!
Comment 2 Sam Lantinga 2013-05-16 03:46:28 UTC
Colin Barrett fixed the _allmul issue in bug 1846.