From dev-return-14509-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Mon Aug 08 22:45:32 2005 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 53750 invoked from network); 8 Aug 2005 22:45:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Aug 2005 22:45:32 -0000 Received: (qmail 11667 invoked by uid 500); 8 Aug 2005 22:45:30 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 11627 invoked by uid 500); 8 Aug 2005 22:45:30 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 11605 invoked by uid 99); 8 Aug 2005 22:45:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2005 15:45:30 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [193.77.5.150] (HELO guardian.hermes.si) (193.77.5.150) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2005 15:45:52 -0700 Received: from primus.hermes.si (primus.hermes.si [193.77.5.98]) by guardian.hermes.si (8.9.3/8.9.3) with ESMTP id AAA16227; Tue, 9 Aug 2005 00:45:24 +0200 (METDST) Received: from localhost (localhost.localdomain [127.0.0.1]) by primus.hermes.si (Postfix) with ESMTP id 43FA973C77; Tue, 9 Aug 2005 00:45:19 +0200 (CEST) Received: from primus.hermes.si ([127.0.0.1]) by localhost (primus.hermes.si [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10996-06; Tue, 9 Aug 2005 00:45:18 +0200 (CEST) Received: from [10.193.6.11] (unknown [10.193.6.11]) by primus.hermes.si (Postfix) with ESMTP id C83B473C6A; Tue, 9 Aug 2005 00:45:18 +0200 (CEST) Message-ID: <42F7E081.2000501@xbc.nu> Date: Tue, 09 Aug 2005 00:45:21 +0200 From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@apr.apache.org Cc: Henry Jen Subject: Re: apr_pool_terminate References: <42F3DE73.1070007@ztune.net> <42F7CC9E.7070609@ztune.net> <42F7DFF7.1090205@xbc.nu> In-Reply-To: <42F7DFF7.1090205@xbc.nu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: internal amavisd-new 2.3.1 (20050509) at hermes.si X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Grrr.Sometimes I wish there was a "cancel post" option for e-mail as well as news. Just ignore me, I'm going through my stupid phase again. Branko Čibej wrote: > Henry Jen wrote: > >> Henry Jen wrote: >> >>> Hi, >>> >>> The debug version of apr_poor_terminate does not support nested >>> initialization as regular version, is this a bug or on purpose? >>> >>> I guess it is a bug, but want to hear second opinion. :-) >>> >> >> >> I guess no one would care if there is no patch available. So here is >> a patch. :-) > > > Yeah. Pity it's wrong... > >> Index: memory/unix/apr_pools.c >> =================================================================== >> --- memory/unix/apr_pools.c (revision 230894) >> +++ memory/unix/apr_pools.c (working copy) >> @@ -1264,7 +1264,8 @@ >> if (!apr_pools_initialized) >> return; >> >> - apr_pools_initialized = 0; >> + if (--apr_pools_initialized) >> + return; >> >> > Take a good look at what happens just before the line you changed. -- Brane