ccache on amd64
brian at brianwhalen.net
Thu Sep 25 19:26:55 UTC 2008
> 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
> 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 at 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.
More information about the freebsd-questions