At 10:25 PM -0600 12/10/01, Ben Combee wrote: > > But I don't know every way you could be messing up the >> stack. Maybe someone with more compiler knowledge >> would like to comment. (Ben?) > >The easiest way to kill your return address on the stack is to overrun >the bounds of an array you have as a local variable. Saying > >char foo[4]; >strcpy(foo, "test"); > >can kill your return address, since you write one character too many. >This could also kill the saved frame pointer, making the function >returned to malfunction.
While this is a common way to kill your return address (or other local variables on the stack), it doesn't seem to be what's going on here. The invalid address is 0x10C23F65. If the return address were being smashed, you'd expect to see the upper bytes corrupted, not the lower bytes. I find it interesting that the low byte is 0x65, or the ASCII value for 'e'. But that may be just a coincidence (as is the fact that the previous byte is ASCII for '?'). Of course, Julio *could* be doing something like: char foo[4]; foo[11] = 'e'; But I might be stretching there... -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
