apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [PATCH] Re: the most common seg fault on daedalus
Date Mon, 15 Apr 2002 17:15:50 GMT
Cliff Woolley <jwoolley@virginia.edu> writes:

> Okay, so this is a totally different problem.  Tangentially related at
> best.
> 
> Here's the situation:
> 
>  1) create a brigade in pool p (call it r->pool)
>  2) create an mmap in the same pool or a subpool
>       (note: it might have to be a subpool, but I'm not sure)
>  3) put the mmap in an mmap bucket
>  4) clear pool p
> 
> Because the mmap was created *after* the brigade and pool cleanups get run
> in LIFO order, #4 implies the following:
> 
>   4a) mmap_cleanup in mmap.c will munmap the region and set mm->mm to -1
>       (note: the -1 is what was *supposed* to save us here)
>   4b) brigade_cleanup will destroy the mmap bucket via mmap_destroy from
>       apr_buckets_mmap.c.
>   4c) mmap_destroy discovers it's the last remaining reference to the
>       mmap, and so calls apr_mmap_delete
>   4d) boom

What happens if we kill the cleanup on the apr_mmap_t when we create
an mmap bucket?

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Mime
View raw message