delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/04/24/04:06:57

Date: Tue, 24 Apr 2001 10:14:14 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Nimrod A. Abing" <n_abing AT ns DOT roxas-online DOT net DOT ph>
cc: djgpp-workers AT delorie DOT com, broeker AT physik DOT rwth-aachen DOT de
Subject: Re: Fixed core dumper in dpmiexcp.c
In-Reply-To: <3.0.1.32.20010424150443.006968bc@wingate>
Message-ID: <Pine.SUN.3.91.1010424101017.7426O@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 24 Apr 2001, Nimrod A. Abing wrote:

> At 01:55 PM 04/23/2001 +0300, you wrote:
> >> Eli, is it possible for the __djgpp_memory_handle_list to
> >> become corrupt prior to an exception?
> >
> >A bug can do that.  Otheriwse, __djgpp_memory_handle_list should be
> >right at all times, since nohing will work if it isn't.  An exception
> >might invalidate some of the registers, but it does nothing to the
> >variables which live inside an application, nor to its page tables.
> 
> What kind of bug?

A bug that causes the program to access pages that were not allocated by 
the DPMI host.  For example, some off-by-one error in computing the pages 
that belong to a given DPMI handle.  Or some code which overwrites 
crucial data in the handle list.

> Would programs that leak memory also cause this to happen
> somehow?

If by ``leak memory'' you mean that they are not calling `free', then no, 
I don't think such bugs can cause a Page Fault like the ones you posted.  
`sbrk' doesn't care about what happens with memory it allocates from the 
DPMI host.

- Raw text -


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