Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2008 12:03:12 -0700
From:      Brian <brian@brianwhalen.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: ccache on amd64
Message-ID:  <48DBE070.7060406@brianwhalen.net>
In-Reply-To: <200809251549.41342.fbsd.questions@rachie.is-a-geek.net>
References:  <48D7092B.1040503@brianwhalen.net>	<200809251250.25782.fbsd.questions@rachie.is-a-geek.net> <200809251549.41342.fbsd.questions@rachie.is-a-geek.net>

next in thread | previous in thread | raw e-mail | index | archive | help

> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48DBE070.7060406>