Path: utzoo!mnetor!uunet!husc6!mailrus!ames!oliveb!pyramid!prls!mips!dce
From: dce@mips.COM (David Elliott)
Newsgroups: comp.unix.wizards
Subject: Re: signal 10 in malloc call???
Message-ID: <2149@quacky.mips.COM>
Date: 8 May 88 16:50:47 GMT
References: <3989@killer.UUCP> <640@vsi.UUCP> <4016@killer.UUCP>
Reply-To: dce@mips.COM (David Elliott)
Organization: MIPS Computer Systems, Sunnyvale, CA
Lines: 19
Keywords: sys V rel 3.1, died in malloc?

In article <4016@killer.UUCP> toma@killer.UUCP (Tom Armistead) writes:
>He told me to use the special malloc(3X) library with
>'-lmalloc' on the cc command line. I did this and the problem has gone
>away!!!  "Thank you Antie Em, I'm not CRAZY!!!"

I hate to burst your bubble, Tom, but this doesn't really show that the
standard libc malloc() is broken.

It turns out that malloc(3X) is slightly different.  For example, if
you malloc() 0 bytes, one of the mallocs returns NULL and one returns
a pointer.  I have also seen cases (some compiler product) where using
-lmalloc fixed a bug (similar to your case), and it turned out that there
was actually a bug in the code.

Sure, it may be that you've triggered a rare bug in malloc(), but malloc()
is used so much that it really should be bomb-proof.

-- 
David Elliott		dce@mips.com  or  {ames,prls,pyramid,decwrl}!mips!dce