Mail Archives: djgpp-workers/2002/03/02/14:03:04
Charles Sandmann wrote:
>
> > > Date: Fri, 01 Mar 2002 16:26:35 -0500
> > > From: CBFalconer <cbfalconer AT yahoo DOT com>
> > >
> > > The point of the
> > > SIGSEGV would be that the rest of the system would provide a
> > > traceback, while a message to stderr would not.
> >
> > That's why I suggested SIGABRT instead: it also produces a traceback.
>
> SIGABRT is fine, but I'd also like to see a message why the abort
> happened, something like:
>
> Malloc memory control structures are corrupt, probably due to program
> writing data beyond the end of the allocated data.
>
> or
>
> Attempt to free a memory block not allocated with malloc.
>
> Real exceptions happen because we didn't catch them - so we show everything
> we know about it. If we are going to raise an exception, lets tell the
> user why, instead of making it hard to understand. Only a few dozen
> people really understand our register dump and trace stuff and why it's
> our gift to them :-)
No great sweat doing that, but as I discovered early on malloc is
used during initialization and if any errors occur then writing to
stdout at least is fatal and useless. If I have to put back in
the debug printout mechanism for that feature the code will grow
considerably. I assume write to the stderr handle will work as
well as write to the stdout handle (not fwrite to streams).
--
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net)
Available for consulting/temporary embedded and systems.
(Remove "XXXX" from reply address. yahoo works unmodified)
mailto:uce AT ftc DOT gov (for spambots to harvest)
- Raw text -