Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 71656 invoked by uid 500); 15 Apr 2002 18:19:38 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 71645 invoked from network); 15 Apr 2002 18:19:38 -0000 Date: Mon, 15 Apr 2002 14:18:14 -0400 (EDT) From: Cliff Woolley X-X-Sender: root@deepthought.cs.virginia.edu To: Brian Pane cc: dev@apr.apache.org Subject: Re: [PATCH] Re: the most common seg fault on daedalus In-Reply-To: <3CBB17EA.2060303@cnet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Mon, 15 Apr 2002, Brian Pane wrote: > I like Justin's suggestion: a generic function that removes all cleanups > registered for a given object. > > In fact, we could even do this by overloading apr_pool_cleanup_kill() to > allow NULL as the cleanup pointer, where NULL means "unregister all cleanups > that match this object." It could help in this case, but watch out though; when the cleanup gets called, we have little to no time left before the apr_foo_t itself goes away and we lose access to whatever resource it represented. In some cases we can make assumptions based on our knowledge of how pool cleanups work internally, but especially with the changes proposed for apr_allocator_* to have a freelist size limit and so forth, we could get ourselves into trouble easily with a feature like this. --Cliff -------------------------------------------------------------- Cliff Woolley cliffwoolley@yahoo.com Charlottesville, VA