Typically, overflowing a buffer that's allocated on the stack.

2.1 may be better at detecting them than 1.5, or there could be other
differences behind the difference in behavior.

You might also get it by mis-declaring the number of arguments -- that
is, the function takes N arguments but you name it as if it had a
different signature. This can cause the stack pointer to get mis-
aligned, making the stack look like it's been corrupted. But that will
usually be consistent, and I would not expect it to vary with the
packet size.

On Aug 10, 7:46 am, Eli A <[email protected]> wrote:
> I'm trying to use native implementation of UDP server/client on
> Android, I'm using JNI to access the native code from java.
>
> The code was tested successfully on Android 1.5 (HTC Hero) but when I
> tried to run the same application on Android 2.1 (HTC Legend) I got
> "Stack Corruption Detected" every time I received a packet bigger than
> 32 byte and the application crashed.
>
> Does anyone has a clue what could cause the stack corruption?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to