Date: Wed, 27 Oct 2004 10:13:04 -0700 From: "David O'Brien" <obrien@NUXI.com> To: "James R. Van Artsalen" <james@jrv.org> Cc: freebsd-amd64@freebsd.org Subject: Re: two 4GB mallocs => SEGV Message-ID: <20041027171304.GA73746@dragon.nuxi.com> In-Reply-To: <20041026213227.GA95016@dragon.nuxi.com> References: <20041026115041.GE2841@sivokote.iziade.m$> <20041026173005.GA2984@dragon.nuxi.com> <417E8F7A.70009@jrv.org> <20041026213227.GA95016@dragon.nuxi.com>
index | next in thread | previous in thread | raw e-mail
On Tue, Oct 26, 2004 at 02:32:27PM -0700, David O'Brien wrote:
> On Tue, Oct 26, 2004 at 12:55:06PM -0500, James R. Van Artsalen wrote:
> > A few months ago I posted this bug in the libc brk(2) code - the stack
> > is not balanced if the kernel returns an error. I'm not running current
> > code at the moment but see if you brk.S has a stack issue at the err:
> > label. Stick in this pop if so and report if malloc(3c) then returns
> > NULL instead of crashing, then up your ulimit and try again and see if
> > all works without error.
> >
> > --- lib/libc/amd64/sys/brk.S.~1~ Sat May 24 12:35:23 2003
> > +++ lib/libc/amd64/sys/brk.S Fri Apr 9 02:02:22 2004
> > @@ -78,6 +78,7 @@
> > popq %rdi
> > ret
> > err:
> > + popq %rdi
VERY sorry. I looked at sbrk.S not brk.S. Your fix is correct.
^^^
Starting program: /var/tmp/a.out
3221225472
5255168
3226480640
--
-- David (obrien@NUXI.com)
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041027171304.GA73746>
