November 16th, 2008, 03:47 PM
Stack overflow on function call
I am getting a stack overflow in the moment when I call one of my own functions. By stepping with the debugger, I can see that the overflow takes place when the function body is entered.
At first I thought I would perhaps overwrite memory somewhere, thus overwrite the function itself. But I kept monitoring the function address and it doesn't change from the moment of start up, so it is not overwritten.
I of course do pass correct parameters types and values.
What causes can there be for such a thing?
Here is the disassembled code - the overflow occurs on the last line. (the normal code wouldn't help here since there is no code representation for "entering the body")
00416FF5 movzx eax,byte ptr [temp]
00416FFC push eax
00416FFD call Run (411005h)
00417002 add esp,4
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!