Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51733 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79508 invoked from network); 21 Mar 2011 00:20:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Mar 2011 00:20:52 -0000 Authentication-Results: pb1.pair.com header.from=tstarling@wikimedia.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=tstarling@wikimedia.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain wikimedia.org from 66.111.4.27 cause and error) X-PHP-List-Original-Sender: tstarling@wikimedia.org X-Host-Fingerprint: 66.111.4.27 out3.smtp.messagingengine.com Received: from [66.111.4.27] ([66.111.4.27:40814] helo=out3.smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/10-12588-2E9968D4 for ; Sun, 20 Mar 2011 19:20:51 -0500 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 18B252087F; Sun, 20 Mar 2011 20:20:48 -0400 (EDT) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 20 Mar 2011 20:20:48 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=AcpWkTvia68soNW+11qdsD8RAz0=; b=sCcJJPKZLOx9P747DxhO/bfWOsvZRYgnSEfX80vsyDvRr1ppkdRh/yV26wybulxT4vaQWf3QnOiDRyfkfMax1e5Er/FvNzNm5dt8v6Yh+HvnN6L23Bj/sOTmxeK5lo3ToGncr8+G48G5qP5hhS7hgVESv4TCTFkF6in5ksVK9dQ= X-Sasl-enc: JonSHNo1b0Fo1kb60jYBIwAMIZ7HcUAKk77FNF8FIXcm 1300666847 Received: from [10.0.0.2] (CPE-124-184-7-246.lns10.cht.bigpond.net.au [124.184.7.246]) by mail.messagingengine.com (Postfix) with ESMTPSA id 2DA3C40186E; Sun, 20 Mar 2011 20:20:46 -0400 (EDT) Message-ID: <4D8699DC.2060801@wikimedia.org> Date: Mon, 21 Mar 2011 11:20:44 +1100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: Stas Malyshev CC: internals Mailing List References: <4D803F21.1010209@wikimedia.org> <4D855DF2.8040702@wikimedia.org> <4D8574EF.60003@sugarcrm.com> In-Reply-To: <4D8574EF.60003@sugarcrm.com> X-Enigmail-Version: 1.1.2 OpenPGP: id=BF976370 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [patch] Session RSHUTDOWN, shutdown_destructors() issues From: tstarling@wikimedia.org (Tim Starling) On 20/03/11 14:30, Stas Malyshev wrote: > Hi! > >> I guess I'm suffering from some tl;dr here. Here's the short version: >> please apply the attached patch to the 5.3 branch. It removes some >> code which is broken and unnecessary. > > I'm not sure it's a good idea. That code is there for a reason, > specifically: http://svn.php.net/viewvc?view=revision&revision=216213 > Did you check that this test still works when you apply your patch? It doesn't work, because my patch is just a revert. That bug (36759) doesn't seem to have anything to do with global variables, so deleting global variables seems like an odd response to it. r216213 fixes that one test case, but it seems like the actual complaint there is that objects stored in member variables are destroyed before their parent objects. r216213 fixes this by assuming that all parent objects will be in the global symbol table. It deletes global symbol table entries, so that only objects which are referred to from somewhere else will survive until the zend_objects_store_call_destructors(). If you take Dmitry's test case and replace this: $y = new Bar(); $x = new Foo($y); with this: function foo() { static $x, $y; $y = new Bar(); $x = new Foo($y); } foo(); then the bug is still seen. Or indeed, because of the logic error I've discussed, this also shows an incorrect destructor order: $y = new Bar(); $x = new Foo($y); $z = $x; Can you reopen bug 36759 please? -- Tim Starling