Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 15893 invoked from network); 2 Dec 2004 15:08:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Dec 2004 15:08:12 -0000 Received: (qmail 23464 invoked by uid 500); 2 Dec 2004 15:06:51 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 23372 invoked by uid 500); 2 Dec 2004 15:06:50 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 23333 invoked by uid 99); 2 Dec 2004 15:06:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.logilune.com (HELO mail.logilune.com) (195.80.154.36) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Dec 2004 07:06:35 -0800 Received: from [127.0.0.1] (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id C20221E1A01; Thu, 2 Dec 2004 16:06:25 +0100 (CET) Message-ID: <41AF2F6F.2010403@stason.org> Date: Thu, 02 Dec 2004 10:06:23 -0500 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: Joe Schaefer Cc: dev@perl.apache.org Subject: Re: [mp2] pools that go out of scope aren't a problem anymore? References: <41A60A95.6010904@stason.org> <87fz2x4qu0.fsf@gemini.sunstarsys.com> <41A6411A.3010308@stason.org> <878y8p4p2n.fsf@gemini.sunstarsys.com> <41A66AEA.6090101@stason.org> <41A7A73C.8020701@stason.org> <41A7C343.4010703@stason.org> <41AEBE96.3000806@ectoplasm.org> <87llchrvjm.fsf@gemini.sunstarsys.com> In-Reply-To: <87llchrvjm.fsf@gemini.sunstarsys.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Joe Schaefer wrote: > "Philippe M. Chiasson" writes: > > >>my $pool; >>sub handler { >> my $r = shift; >> $pool ||= $r->pool; #XXX: Yes, bad bad bad, but still... >> APR::Table::make($pool, 10); #bam! >>} >> >>The problem in this case is that apache destroyed the request pool at >>the end of the first request. And we now have a valid $pool that now >>points to a freed pool. It's an incorrect usage of the API, I know, >>but the resulting segv isn't nice... > > > This is a problem with persistence, not "ownership", and affects the > entirety of mp2's object system. In other words, there's no reason to > single out pools in your example, the bug could just as easily been > > my $r; > > sub handler { > $r ||= shift; > my $pool = $r->pool; #bam! > } > > "Fixing" this problem is certainly a challenge, but IMO not > worth worrying about for 2.0. Agreed. That's said this issue is not critical for RC1, since they user API won't change, we can work on it in parallel, but certainly will finish it before the gold release. -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org