Date: Tue, 20 Aug 2002 18:55:44 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: stable@freebsd.org Cc: ian@niw.com.au Subject: Re: Malloc backwards compat problem in stable as of yesterday ? Message-ID: <200208210155.g7L1tiJx083675@vashon.polstra.com> In-Reply-To: <20020820222727.GC407@axiom.niw.com.au> References: <20020820222727.GC407@axiom.niw.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <20020820222727.GC407@axiom.niw.com.au>,
Ian West <ian@niw.com.au> wrote:
> The following program when compiled on a box cvs updated to RELENG_4
> late yesterday (about 8 hours ago) works fine on the box itself, but the
> dynamic binary fails (returns 0) when run on a box running RELENG_4 from
> about a week ago. Is this a known and expected issue ?
>
> #include <stdlib.h>
> #include <stdio.h>
>
> int
> main(int argc, char **argv){
> char *temp=(char *)malloc(24);
> printf("temp=%p\n",temp);
> }
Yes, and what a pain! For any program linked against a recent
libc but run against a slightly older one, malloc fails on
all calls. I looked into it a bit, and found that sbrk() is
returning garbage. I'm fairly certain the cause was this commit to
"src/lib/libc/i386/sys/sbrk.S":
revision 1.7.2.1
date: 2002/08/12 14:23:29; author: kan; state: Exp; lines: +3 -3
MFC 1.11: Use '_end' symbol instead of 'end' to initialize minbrk
and curbrk variables.
Approved by: obrien
John
--
John Polstra
John D. Polstra & Co., Inc. Seattle, Washington USA
"Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208210155.g7L1tiJx083675>
