Mail Archives: djgpp/1997/03/27/05:31:13
On Wed, 26 Mar 1997, Terry Page wrote:
> Could someone possible explain what may be causing the following
> error.
>
> Exiting due to signal SIGSEGV
> Page fault at eip 0007e332, error=0004
>
> Plus a list of what appears to register addresses.
Most probably, the program dereferenced a NULL pointer, or an
uninitialized pointer and was aborted by the DJGPP memory-protection
mechanism.
Since that program is something you compiled yourself, you will have
to invest some effort in debugging the reason for it. Possible causes
include: (1) a real bug in the original code that just went unnoticed
on other platforms; (2) you have invoked/used the program in a way
that you aren't supposed to (e.g., called options which aren't
supported or cannot work on MS-DOS, or you lack some file that the
program needs); (3) the program needs a patch to make it work on
MS-DOS correctly in some particular case.
The starting point to debugging is that same list of register
addresses which you omitted. What you should do is invoke the `symify'
program immediately after the program crashes and those addresses are
still on screen, like so:
symify progname
where <progname> is the name of the porogram. (It is best to chdir to
the directory where the sources reside before issuing the above
command.) You should then see the list of addresses converted to
references to source files and line numbers that identify the sequence
of function calls which led to the crash (the uppermost address is
where the crash actually happened). More info about usng `symify' can
be found in the DJGPP FAQ list (v2/faq210b.zip from the same place you
get DJGPP, section 9.2.) You need then look at the sources at these
places and try to understand what went wrong, or run the program under
a debugger if you can't figure it out by looking at the sources alone.
- Raw text -