aboutsummaryrefslogtreecommitdiff
path: root/devel/ccache
diff options
context:
space:
mode:
authorMichael Johnson <ahze@FreeBSD.org>2008-11-24 03:32:46 +0000
committerMichael Johnson <ahze@FreeBSD.org>2008-11-24 03:32:46 +0000
commitf61d73c5e54355782ca3570236e966ee485d1091 (patch)
tree82bb2ef4fd16f368ca587e9d42ae4df4ddaf9f20 /devel/ccache
parent68a978ac81ffcf4b2c29260a11fe7dd927dfbc11 (diff)
downloadports-f61d73c5e54355782ca3570236e966ee485d1091.tar.gz
ports-f61d73c5e54355782ca3570236e966ee485d1091.zip
Notes
Diffstat (limited to 'devel/ccache')
-rw-r--r--devel/ccache/Makefile2
-rw-r--r--devel/ccache/files/patch-util.c25
2 files changed, 26 insertions, 1 deletions
diff --git a/devel/ccache/Makefile b/devel/ccache/Makefile
index 946f08698dfd..da5d96adcef2 100644
--- a/devel/ccache/Makefile
+++ b/devel/ccache/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ccache
PORTVERSION= 2.4
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= devel
MASTER_SITES= http://samba.org/ftp/ccache/
diff --git a/devel/ccache/files/patch-util.c b/devel/ccache/files/patch-util.c
new file mode 100644
index 000000000000..58b76d94f35c
--- /dev/null
+++ b/devel/ccache/files/patch-util.c
@@ -0,0 +1,25 @@
+$MirOS: ports/devel/ccache/patches/patch-util_c,v 1.1 2008/10/05 17:03:37 tg Exp $
+
+ Very interesting bug: tries to read “size” bytes
+ from “ptr” (of size “oldsize”) while copying to
+ “p2” (of size “size”), instead of “oldsize” bytes;
+ with mmap malloc, jemalloc, and possibly omalloc,
+ the additional RAM needed is not always in core…
+
+--- util.c.orig Mon Sep 13 10:38:08 2004
++++ util.c Sun Oct 5 16:58:39 2008
+@@ -187,13 +187,9 @@ void *x_realloc(void *ptr, size_t size)
+ {
+ void *p2;
+ if (!ptr) return x_malloc(size);
+- p2 = malloc(size);
++ p2 = realloc(ptr, size);
+ if (!p2) {
+ fatal("out of memory in x_realloc");
+- }
+- if (ptr) {
+- memcpy(p2, ptr, size);
+- free(ptr);
+ }
+ return p2;
+ }