Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 95867 invoked by uid 500); 10 Jan 2002 18:40:50 -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 95849 invoked from network); 10 Jan 2002 18:40:50 -0000 X-Authentication-Warning: rdu163-40-092.nc.rr.com: trawick set sender to trawick@attglobal.net using -f Sender: trawick@rdu163-40-092.nc.rr.com To: dev@apr.apache.org Subject: [PATCH] necessary fix to APR_POOL_DEBUG? From: Jeff Trawick Date: 10 Jan 2002 13:39:02 -0500 Message-ID: Lines: 32 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N While trying to run with APR_POOL_DEBUG I hit a segfault almost immediately trying to dereference pool->mutex, which wasn't a valid pointer. I see a path where pool->mutex isn't initialized. This seems to fix it, though perhaps one of the pool guys wants to just set the mutex field? Index: srclib/apr/memory/unix/apr_pools.c =================================================================== RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v retrieving revision 1.126 diff -u -r1.126 apr_pools.c --- srclib/apr/memory/unix/apr_pools.c 1 Jan 2002 23:49:23 -0000 1.126 +++ srclib/apr/memory/unix/apr_pools.c 10 Jan 2002 18:38:57 -0000 @@ -1,3 +1,4 @@ +#define APR_POOL_DEBUG /* ==================================================================== * The Apache Software License, Version 1.1 * @@ -982,6 +983,8 @@ return APR_ENOMEM; } + + memset(pool, 0, SIZEOF_POOL_T); pool->abort_fn = abort_fn; pool->child = NULL; -- Jeff Trawick | trawick@attglobal.net | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...