delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/11/04/06:22:51

Date: Sun, 4 Nov 2001 13:18:16 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Piotr Fusik <P DOT Fusik AT elka DOT pw DOT edu DOT pl>
cc: djgpp AT delorie DOT com
Subject: Re: Keyboard interrupt
In-Reply-To: <001901c1651f$df3887a0$4bd24dd5@piec>
Message-ID: <Pine.SUN.3.91.1011104131442.19105A-100000@is>
MIME-Version: 1.0
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019