Date: Sun, 4 Nov 2001 13:18:16 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Piotr Fusik

cc: djgpp AT delorie DOT com Subject: Re: Keyboard interrupt In-Reply-To: <001901c1651f$df3887a0$4bd24dd5@piec> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 4 Nov 2001, Piotr Fusik wrote: > I compile following code with gcc 2.95.3 with -O2. > The key_handler function has no stack variables, but gcc does some > optimizations, which result in using the stack. I noticed that this causes > Win 98 crashes. If the stack is not used, it works. > I tried removing asm's, but it didn't help. The code is not mine, so don't > ask why it's done that way. > What's wrong? Probably because the stack isn't locked. You could lock everything, if you don't need large amounts of memory; see section 18.9 of the FAQ for details. The variable raw_key is also not locked, AFAICS. That's a no-no.