]> granicus.if.org Git - apache/commitdiff
Merge r1493921, r1515162 from trunk:
authorJim Jagielski <jim@apache.org>
Wed, 18 Dec 2013 13:10:23 +0000 (13:10 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 18 Dec 2013 13:10:23 +0000 (13:10 +0000)
mod_socache_shmcb.c: Remove arbitrary restriction on shared memory size
previously limited to 64MB.

Limit SHMCB_MAX_SIZE to min(UINT_MAX, APR_SIZE_MAX) to match the current code

Submitted by: minfrin, sf
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1551932 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/cache/mod_socache_shmcb.c

diff --git a/CHANGES b/CHANGES
index 8ed8bed7a8b6a2dac825d3c04aef30e93b1e456a..baff16c911d73958fae3c3252ffbaabfa3d12644 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 
 Changes with Apache 2.4.8
 
+  *) mod_socache_shmcb.c: Remove arbitrary restriction on shared memory size
+     previously limited to 64MB. [Jens Låås <jelaas gmail.com>]
 
 Changes with Apache 2.4.7
 
diff --git a/STATUS b/STATUS
index c91f9be98bd26a95bf09b2f1ca4123fac68e865f..cd89d72abf483c72fc400da251a9b574ccf105d8 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -98,27 +98,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * mod_socache_shmcb.c: Remove arbitrary restriction on shared memory size
-    previously limited to 64MB.
-    trunk patch: http://svn.apache.org/r1493921
-    2.4.x patch: trunk patch works modulo CHANGES
-    +1: minfrin, jim
-    +1: jailletc36 with r1515162
-    sf notes: I think a number of variables need to be changed from int to
-              apr_size_t, including subcache_size, subcache_data_offset,
-              subcache_data_size, total, cache_total. 
-              AIUI, especially cache_total starts to go wrong if the cache
-              gets larger than 4GB (UINT_MAX). Maybe set the limit at
-              MIN(APR_SIZE_MAX,UINT_MAX) until this is fixed?
-    minfrin: Surely we should just fix these unsigned ints? Not sure what value
-             there would be in trying to bake in an arbitrary limit in the mean
-             time when we can just fix the underlying problem instead.
-        jim: Agree w/ minfrin
-    sf:      This would require someone to do the work. Until someone has the 
-             necessary free cycles, I propose to include
-             http://svn.apache.org/r1515162
-    rjung:   See also interim proposal below which becomes obsolete once the
-             one here is accepted but fixes a compiler warning in the meantime.
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index f6bf1dab2850df6dd90e8a5be21b756cbdc1402e..a9164311605b8e57382f21aef861262d5bfe9a9e 100644 (file)
 
 #include "ap_socache.h"
 
-#define SHMCB_MAX_SIZE (64 * 1024 * 1024)
+/* XXX Unfortunately, there are still many unsigned ints in use here, so we
+ * XXX cannot allow more than UINT_MAX. Since some of the ints are exposed in
+ * XXX public interfaces, a simple search and replace is not enough.
+ * XXX It should be possible to extend that so that the total cache size can
+ * XXX be APR_SIZE_MAX and only the object size needs to be smaller than
+ * XXX UINT_MAX.
+ */
+#define SHMCB_MAX_SIZE (UINT_MAX<APR_SIZE_MAX ? UINT_MAX : APR_SIZE_MAX)
 
 #define DEFAULT_SHMCB_PREFIX "socache-shmcb-"