From owner-freebsd-current@FreeBSD.ORG Mon May 31 13:51:50 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A473816A4CF for ; Mon, 31 May 2004 13:51:50 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id E26DF43D2F for ; Mon, 31 May 2004 13:51:49 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i4VKpYo8002676; Mon, 31 May 2004 22:51:34 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: "Willem Jan Withagen" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 31 May 2004 22:41:57 +0200." <0be501c4474f$bb115400$471b3dd4@dual> Date: Mon, 31 May 2004 22:51:34 +0200 Message-ID: <2675.1086036694@critter.freebsd.dk> cc: freebsd-current@freebsd.org Subject: Re: Possible bug in malloc-code X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2004 20:51:50 -0000 In message <0be501c4474f$bb115400$471b3dd4@dual>, "Willem Jan Withagen" writes: > > i = 11 >Alloc: n = 335544320, ADR = 0x00000000485D7000 >Alloc: n = 402653184, ADR = 0x000000005C5D7000 >Alloc: n = 469762048, ADR = 0x00000000745D7000 >Alloc: n = 536870912, ADR = 0xFFFFFFFF905D7000 >Free: n = 536870912, ADR = 0xFFFFFFFF905D7000 >rMemoryDrv in free(): error: junk pointer, too high to make sense >Abort (core dumped) As for this part: Does the program in fact have a prototype for malloc(3) in sight ? Can you try to explicitly add a wrong prototype to see that it complains ? Alternatively, #include to get it a prototype. I looked briefly at the source code of the test-program and while I am in a position to say that it is doing something wrong with the casting, it does look mightily bogus to me. Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.