[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Corruption of high TPA
On my problematic MiNT setup, it crashes even before displaying the message!
But if I subtract 36 bytes from my new stack, it works. So it looks like the
36 highest bytes of the TPA are getting corrupted by something.
Is memory protection enabled in your setup? If so, setting the sp at the
end of the TPA will, IIRC, cause the program to crash at the nearest
system call. This is so because the kernel entry code copies similar
amount of bytes from the user stack to the supervisor stack. Because it
does not know, how many bytes it should copy, it always copies the maximum
amount, and there are kludges in the kernel to fix the sp at the correct
value, when the program starts, but if you set it "manually", it will not
work.
That's what I remember, but maybe it is something else.
Pozdrawiam
KMK