You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2013/12/18 14:10:23 UTC
svn commit: r1551932 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS
modules/cache/mod_socache_shmcb.c
Author: jim
Date: Wed Dec 18 13:10:23 2013
New Revision: 1551932
URL: http://svn.apache.org/r1551932
Log:
Merge r1493921, r1515162 from trunk:
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
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/CHANGES
httpd/httpd/branches/2.4.x/STATUS
httpd/httpd/branches/2.4.x/modules/cache/mod_socache_shmcb.c
Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1493921,1515162
Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1551932&r1=1551931&r2=1551932&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Wed Dec 18 13:10:23 2013
@@ -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
Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1551932&r1=1551931&r2=1551932&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Wed Dec 18 13:10:23 2013
@@ -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 ]
Modified: httpd/httpd/branches/2.4.x/modules/cache/mod_socache_shmcb.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/cache/mod_socache_shmcb.c?rev=1551932&r1=1551931&r2=1551932&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cache/mod_socache_shmcb.c (original)
+++ httpd/httpd/branches/2.4.x/modules/cache/mod_socache_shmcb.c Wed Dec 18 13:10:23 2013
@@ -30,7 +30,14 @@
#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-"