Date: Tue, 24 Apr 2001 10:14:14 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Nimrod A. Abing" 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.