httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Issues with ->pool in CGI environment
Date Sat, 24 Jul 2004 19:04:35 GMT
While working on Cookie.pod I came across
a problem with the ->pool methods.  What happens
is that (in CGI context) because the environment 
object is a pool created by APR::Pool, it is marked 
for destruction via DESTROY.  However methods like
$cookie->pool() and $upload->pool() generate new
objects that point to the same apr_pool_t, and when
those objects go away, that triggers the pool's 
destruction.

We have the same problem with ->env in CGI context,
but that is fixable because we keep a copy of the
original environment sv.   However this won't work
for ->pool, because the environment's sv isn't 
always representing a pool (in mp2 case it's a 
request_rec pointer).

Unless someone has a real desire to fix ->pool, 
I plan we drop this method as being more trouble 
than its currently worth.  Recall that I only 
put it in because ":<APR" requires a pool object, 
but we don't seem to be using that anymore.

-- 
Joe Schaefer


Mime
View raw message