Mail Archives: djgpp/2001/11/04/06:22:51
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 -