Mail Archives: djgpp/2001/09/14/08:10:20
Eric Rudd <rudd AT cyberoptics DOT com> wrote:
> I have a DJGPP program that is bombing with a SIGSEGV error. I have
> reason to believe that the program has an array overflow that is
> corrupting the structure of the heap. (The program actually bombs in a
> malloc call inside fprintf, but at this point I have no convincing
> reason to believe that a system function bug is to blame.)
For most cases, it's probably going to be easiest to use YAMD to catch
this. It'll crash your program and dump sufficient information as
soon as any line of code dares to read or write beyond the end of some
heap-allocated array, or does just about anything else that's fishy.
The main advantage over heap-walking after the fact is that you get
informed not just that somebody crunched your heap, but which line of
code did it, and from where it was called.
Find more in the FAQ, section 9.2 "Programs that crash in `malloc' or
`free'."
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -