From mint-bounce@lists.fishpool.fi Wed Jun 10 04:46:31 2009 X-Authentication-Warning: antyk.ibi.uw.edu.pl: draco owned process doing -bs Date: Wed, 10 Jun 2009 10:38:56 +0200 (CEST) From: "Konrad M. Kokoszkiewicz" X-X-Sender: draco@antyk.ibi.uw.edu.pl To: =?ISO-8859-15?Q?Vincent_Rivi=E8re?= cc: mint Subject: Re: [MiNT] Corruption of high TPA In-Reply-To: <4A2ED03D.1090600@freesbee.fr> Message-ID: References: <4A2ED03D.1090600@freesbee.fr> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (antyk.ibi.uw.edu.pl [127.0.0.1]); Wed, 10 Jun 2009 10:38:56 +0200 (CEST) X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: draco@obta.uw.edu.pl Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: > 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