delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/10/15:38:03

Message-ID: <35560142.F922281E@erols.com>
Date: Sun, 10 May 1998 15:34:26 -0400
From: Dan Chak <chakster AT erols DOT com>
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: DJGPP <djgpp AT delorie DOT com>
Subject: Re: CTRL-C runs an infinite loop
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980510191909 DOT 17537B-100000 AT is>

Eli Zaretskii wrote:
> 
> On Sun, 10 May 1998, Dan Chak wrote:
> 
> > I'm having some strange behavior with DJGPP where when I hit Control-C
> > to break out of my program, I get an infinite loop of the following,
> > instead of being returned to the dos prompt.
> 
> One possibility is that you are overflowing the stack, or otherwise
> overwriting it.
> 
> But for a better answer, please run your program with stderr redirected
> to a file, and post here the beginning of this infinite loop of crashes.
> The first two tracebacks hold the important clues about why does it
> crash, the rest are just the usual DOS/Windows madness.
> 

This might sound a little silly, but how does one redirect stderr?  I've
never really used it.  Do I just open a file and reassign it stderr to
that new file?  I assume it's stderr is pointer to a buffer?  

> Telling a bit about what does your program do might also be useful to
> guess what might go wrong.

Well, it's just a blackjack game that I'm writing with Allegro. 
However, as you suggested, I probably am overwriting the stack by
accident somewhere.  I know through testing the program that something
in my code is overwriting memory it shouldn't be touching and causing
eroneous results.  This is probably just another aberration stemming
from the same problem.

 
Dan                                                    /'^'\
                                                      ( o o )
--------------------------------------------------oOOO--(_)--OOOo--

  Daniel Chak
  chakster AT geocities DOT com
  http://members.xoom.com/chakster                 .oooO
                                                   (   )   Oooo.
----------------------------------------------------\ (----(   )---
                                                     \_)    ) /
                                                           (_/

- Raw text -


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