Malloc bug?
David A. Gatwood
dgatwood at deepspace.mklinux.org
Wed Jul 19 08:37:13 EST 2000
On Tue, 18 Jul 2000, Nathan Ingersoll wrote:
>
> On Tue, 18 Jul 2000, Paul Schinder wrote:
>
> > At 3:40 PM -0500 7/18/00, Nathan Ingersoll wrote:
> > >I've been working on a GTK program for a while now, and I've been
> > >experiencing segfaults within malloc. I was under the impression that
> > >malloc should always return successfully (at least that's what the man
> > >page says).
> >
> > No, it shouldn't. If there's no memory left, it will return NULL.
> > Software should be checking for this.
>
> Right, but it's not returning at all. It's segfaulting inside the malloc
> function before it returns anything.
See my comments in the message I sent a few minutes ago. Any of the #3
problems with free() can cause this.
Later,
David
---------------------------------------------------------------------
A brief Haiku:
Microsoft is bad.
It seems secure at first glance.
Then you read your mail.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-dev
mailing list