Mail Archives: djgpp/1999/12/12/10:29:33
On Fri, 10 Dec 1999, Chris Underwood wrote:
> >Another thing to keep in mind: off the shelf, a DJGPP program wouldn't
> >normally be able to commit this kind of trespass, due to the memory
> >protection offered by protected mode.
>
> This is something which is new to me under DOS. I presume it should also
> never take down Windows, since any memory accesses outside my program bounds
> should cause a SIGSEGV or similar. It can crash Windows though.
Actually, Windows is not very good at protecting itself from runaway
programs. It is true that most bugs only crash the offending program,
sometimes together with the DOS box. But some more blatant errors,
such as allocating 64MB of memory, then paging it in and locking all of
it, are known to wedge Windows. I'm guessing that, since the Windows
built-in DPMI server is central to the operation of the Windows kernel
itself, it cannot be protected too much because the kernel probably plays
some dirty tricks of its own.
> Could I be using the nearptr you're talking about inadvertantly?
One of the libraries that your program is linked against could use near
pointers.
Btw, if some of the crashes result in the nomal DJGPP crash message,
please post it here, complete with the registers' dump and call stack
traceback. Sometimes, just by looking at that info, knowledgeable people
could give you enough hints to find and correct the bug(s).
- Raw text -