From owner-freebsd-stable Tue Aug 20 18:55:57 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5F4C37B400 for ; Tue, 20 Aug 2002 18:55:54 -0700 (PDT) Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1791743E70 for ; Tue, 20 Aug 2002 18:55:54 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id g7L1tmf02993; Tue, 20 Aug 2002 18:55:48 -0700 (PDT) (envelope-from jdp@vashon.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.12.4/8.12.4/Submit) id g7L1tiJx083675; Tue, 20 Aug 2002 18:55:44 -0700 (PDT) (envelope-from jdp) Date: Tue, 20 Aug 2002 18:55:44 -0700 (PDT) Message-Id: <200208210155.g7L1tiJx083675@vashon.polstra.com> To: stable@freebsd.org From: John Polstra Cc: ian@niw.com.au Subject: Re: Malloc backwards compat problem in stable as of yesterday ? In-Reply-To: <20020820222727.GC407@axiom.niw.com.au> References: <20020820222727.GC407@axiom.niw.com.au> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <20020820222727.GC407@axiom.niw.com.au>, Ian West 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 > #include > > 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