Mail Archives: djgpp-workers/2002/03/02/21:46:52
Eli Zaretskii wrote:
>
> > Date: Sat, 02 Mar 2002 13:24:03 -0500
> > From: CBFalconer <cbfalconer AT yahoo DOT com>
> >
> > 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.
>
> It's fatal if you use buffered stdio functions. If you use `write'
> (or even `_write') instead, it's not fatal. The crash message is
> written using these methods, and you could do the same with some
> additional text you print before you abort.
Already put it in, along with things in the test software to
trigger it. It is using write, but it doesn't need sprintf and
buffers etc. so it does become quite simple. Seems to be working
fine, and I am replacing asserts with it now. Detecting freeing a
freed block is not as positive as I thought, because it may have
been combined with other blocks, and the combined block is what is
marked as free. However the asserts that are being changed over
seem to catch that nicely.
Maybe the output message should tell them to "run symify
<progname>"? Really a detail that can be handled at anytime.
--
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 -