diff options
author | Jim Jagielski <jim@apache.org> | 2013-12-18 13:10:23 +0000 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2013-12-18 13:10:23 +0000 |
commit | 6019f94b618db43f0002b5707da8a8d0bb5057cf (patch) | |
tree | 608694459626319ece43f185874664fdb67c98da | |
parent | 351867ebf7e4134e510be446b4c1d0a3abb705a4 (diff) | |
download | httpd-6019f94b618db43f0002b5707da8a8d0bb5057cf.tar.gz |
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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1551932 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | STATUS | 21 | ||||
-rw-r--r-- | modules/cache/mod_socache_shmcb.c | 9 |
3 files changed, 10 insertions, 22 deletions
@@ -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 @@ -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 ] diff --git a/modules/cache/mod_socache_shmcb.c b/modules/cache/mod_socache_shmcb.c index f6bf1dab28..a916431160 100644 --- a/modules/cache/mod_socache_shmcb.c +++ b/modules/cache/mod_socache_shmcb.c @@ -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-" |