Mail Archives: djgpp/1999/08/30/11:55:49
Damian Yerrick wrote:
> > I still say that GPF is produced from your array indices being out of
> > bounds. Remember, don't test in windows as you won't see any error from
> that
> > code at all (i tested the exe you sent me). The Windows DPMI server has a
> > habit of letting pointer dereferences pass.
>
> I don't know about Windows 95 (I've only owned Win 3.1, Win 98, and Macs),
> but you can tell Windows 98's DPMI to be tougher about pointer dereferences
> by telling it to protect memory. This will slow your program slightly, but
> that's normal for debugging.
But, that still doesn't prevent, or even warn about null pointer
dereferencing. Here is an example:
#include <stdio.h>
int main()
{
int* null = 0;
printf("*null=%i\n", *null);
*null = 7;
}
This does not GPF or anything else under Win98, even with the "Protected"
option selected.
--
(\/) Endlisnis (\/)
s257m AT unb DOT ca
Endlisnis AT HotMail DOT com
ICQ: 32959047
- Raw text -