delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/06/04:15:19

Date: Sun, 6 Jun 1999 11:10:59 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Manni Heumann <manfred DOT heumann AT uni-bielefeld DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: A bit more info.
In-Reply-To: <375640ea.0@news.uni-bielefeld.de>
Message-ID: <Pine.SUN.3.91.990606111032.16109K-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 3 Jun 1999, Manni Heumann wrote:

> What's the reason for two kinds of errors you get from windows or under dos 
> from djgpp compiled binaries?

The difference is that the Windows DPMI server doesn't catch NULL
pointer dereference and other similar programmatic errors early
enough.  Instead, it lets them propagate until they screw up some
critical Windows data structures or device drivers, and what you see
is a GPF inside Windows software.  If the GPF popup has the button
DETAILS, you will usually see a name of a Windows module there, and
the address where the GPF happens is more often than not inside
Windows.  (You can tell whether the address is a DJGPP EIP by looking
at its selector: DJGPP programs usually have small numbers there, like
107h, 137h etc.; addresses like FF3C:A1E9 are not ours.)

> I managed two write some crappy code that would 
> produce exactly this, yesterday. So I rebooted, but not to windows
> but to good old dos. I ran the program again, and it wouldn't give
> me a traceback either.  Just an adress.

This usually means that you have corrupted the stack in a way that
totally destroyed the stack frame structure.  That is why you don't
get the traceback: the stack is garbled.  Another possibility is that
the GPF is inside CWSDPMI, in which case you don't get the traceback
because the EIP belongs to CWSDPMI.  The fine details of the crash
message and the registers' dump can be used to find out the exact
reason.

> Is there an explanation for this? Especially for the djgpp part, of course.

Try reading section 12.2 of the FAQ, it has some explanations for
this.  If that doesn't help, post the crash message for the above
program and its source here, and somebody will figure it out.

- Raw text -


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