On Thu, Jul 01, 2004 at 02:06:33PM -0700, Stas Bekman wrote: ... > $7 = (struct apr_bucket *) 0x1011007 > (gdb) print *((*b)->list->prev) > Cannot access memory at address 0x1011007 > > I don't understand why it doesn't happen on my setup which seems to be > pretty close to philippe's one. I suppose it just so happens that the freed > memory is still valid on my machine, due to different compilations. > > The problem appears to be in Apache, where some downstream filter decides > to free the brigade, rendering $bb->cleanup useless, since you can't rely > on $bb to be valid at all. That just sucks.
Right; the thing is that currently, there really is no way to actually "free the brigade"; apr_brigade_destroy() just does an apr_brigade_cleanup() and unregisters the pool cleanup. The brigade structure remains valid until the pool it's allocated from gets destroyed. To help track down the bug: 1) build httpd/apr* with -DAPR_BUCKET_DEBUG to enable the brigade consistency checks; this may show very quickly the problem 2) get a minimal repro case. This is supposed to be failing in the modperl test suite on clean build of httpd/modperl-2.0 HEADs? joe --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
