Mail Archives: djgpp/2004/02/07/15:15:21
"Eli Zaretskii" <eliz AT elta DOT co DOT il> wrote in message news:<3405-Sat07Feb2004162009+0200-eliz AT elta DOT co DOT il>...
> > From: RadSurfer AT yahoo DOT com (Radical NetSurfer)
> > Newsgroups: comp.os.msdos.djgpp
> > Date: 6 Feb 2004 16:27:18 -0800
> >
> > Exiting due to signal SIGSEGV
> > Page fault at eip=00014def, error=0004
> >
> > What is that error = 0004 ?????????
>
> For Page Fault, the error code of 4 means that your program attempted
> to read from a bad address. (This is explained in section 12.2 of the
> FAQ, btw.)
>
> It would be a good idea to post a complete crash traceback, complete
> with the full register dump. Running SYMIFY (or, better yet,
> bfdsymify) on it would be even better. Given that information,
> perhaps someone around here could get some useful ideas about possible
> causes for the crash.
>
> > the exact same identical program does seem to run
> > properly on my P4 with no problems at all....
> >
> > Any ideas?
>
> It's a bug. Page Faults cannot be caused by a bad opcode (which would
> be the case if the program couldn't run on a 486): those trigger
> SIGILL, not SIGSEGV. I suspect that the reason for the different
> behavior is something else, like memory amount/configuration, for
> example. Windows is quite lenient towards bad pointers.
Bullseye! On the P4's, it is through a DOS-shell we run my application under
Win9x, and on those other machines it was "pure" ms-dos (no windoze)!
The program does use malloc() but I check for proper return values;
and the program does do quite a bit of String_manipulation.
Time for a print-out and some good old-fashion analysis!
Here's a question:
Say I wanted to _deliberately_ attempt to get the P4 to actually
behave the same way as these other machines;
Attempt to boot to ms-dos only?
Is there some compile-option that would force using CWSDPMI (?),
and not the Windoze DMPI, etc.? Could prove useful maybe.
> As DJ suggested: debugging the program is the way to find out what
> went wrong.
- Raw text -