You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Eric Covener <co...@gmail.com> on 2007/04/26 23:01:10 UTC
mod_mem_cache pool lifetime problem
http://issues.apache.org/bugzilla/show_bug.cgi?id=41551
mod_mem_cache retains pointers to short-lived (r->pool) storage in its
much longer lived cache by way of calling apr_table_copy on the
response headers. This causes the response headers of
served-from-the-cache respones to point to undefined data.
Current code properly leads to a failed assertion with pool debugging
enabled -- I attached a simple patch to the bug report that does a
deep copy of the response headers before they are stored away in the
cache. This remedied the APR_POOL_DEBUG assertion as well as some
obvious Last-Modified and ETag corruptions I saw.
In 2.0.x mod_mem_cache uses the heap directly, so this is only an issue in
2.2.x/trunk
--
Eric Covener
covener@gmail.com