C2 General

> -----Ursprüngliche Nachricht-----
> Von: Yann Ylavic <[email protected]>
> Gesendet: Donnerstag, 9. Mai 2019 11:54
> An: httpd-dev <[email protected]>
> Betreff: Re: eor bucket
> 
> On Thu, May 9, 2019 at 11:37 AM Stefan Eissing
> <[email protected]> wrote:
> >
> > > Am 09.05.2019 um 11:32 schrieb Yann Ylavic <[email protected]>:
> > >
> > > The issue is more that the hooks in eor_bucket_cleanup() will be run
> > > multiple times, rather than a lifetime issue.
> >
> > I read it like this:
> > The cleanup is only registered on the first creation. The copy never
> registers. But the bucket_destroy calls the pool destroy each time.
> 
> Ah yes, apr_bucket_copy() (i.e. apr_bucket_simple_copy()) won't do the
> right thing for eor, there should be an eor_bucket_copy() to register
> the cleanup for the copy too.
> 
> We should also possibly split the eor cleanup in two, one (registered
> first) to run the hooks, and the second for NULLing b->data.
> Both (but mainly the first one) would do nothing is b->data is already
> NULL. That way I think the eor can be safely copied.

I think we should follow a similar design pattern as we do with MMAP/file 
buckets which use a refcount.

Regards

Rüdiger

Reply via email to