From owner-freebsd-questions@FreeBSD.ORG Thu Sep 25 19:26:55 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C9251065687 for ; Thu, 25 Sep 2008 19:26:55 +0000 (UTC) (envelope-from brian@brianwhalen.net) Received: from entwistle.sonicboom.org (entwistle.sonicboom.org [66.93.34.170]) by mx1.freebsd.org (Postfix) with ESMTP id 63E7C8FC1B for ; Thu, 25 Sep 2008 19:26:55 +0000 (UTC) (envelope-from brian@brianwhalen.net) Received: from [127.0.0.1] (localhost.sonicboom.org [127.0.0.1]) by entwistle.sonicboom.org (8.14.2/8.14.2) with ESMTP id m8PJ355M007750 for ; Thu, 25 Sep 2008 12:03:06 -0700 (PDT) (envelope-from brian@brianwhalen.net) Message-ID: <48DBE070.7060406@brianwhalen.net> Date: Thu, 25 Sep 2008 12:03:12 -0700 From: Brian User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <48D7092B.1040503@brianwhalen.net> <200809251250.25782.fbsd.questions@rachie.is-a-geek.net> <200809251549.41342.fbsd.questions@rachie.is-a-geek.net> In-Reply-To: <200809251549.41342.fbsd.questions@rachie.is-a-geek.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ccache on amd64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2008 19:26:55 -0000 > Ok, cracked it. ccache will dump core, if the argument list >255 arguments, > most likely because the page size is 2048 bytes, but I'm guessing here. What > happens in x_realloc is that it wants to copy the 2048+8 from the old pointer > to the new, yet the old pointer is only 2040 bytes big. > I think it goes ok, till 2048, because 2048 is allocated regardless. You won't > see this on 32-bits, because you don't hit this size as the pointer size is > only 4 bytes. Most likely, you will hit this bug with argument list >510 > arguments. > > The patch inlined below my sig will fix the problem. I'll file a PR so that > ahze@ can fix it properly. Save it > as /usr/ports/devel/ccache/files/patch-args.c and reinstall ccache. > > here are my unfortunate results [root@amd /usr/ports/devel/ccache]# make ===> Patching for ccache-2.4_7 ===> Applying FreeBSD patches for ccache-2.4_7 patch: **** malformed patch at line 9: sizeof(char *)); => Patch patch-args.c failed to apply cleanly. *** Error code 1 Stop in /usr/ports/devel/ccache.