Mail Archives: djgpp-workers/2001/04/24/04:06:57
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 -