Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94997 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88976 invoked from network); 10 Aug 2016 10:52:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Aug 2016 10:52:44 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.19 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.19 mout.gmx.net Received: from [212.227.15.19] ([212.227.15.19:51714] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/13-08042-B770BA75 for ; Wed, 10 Aug 2016 06:52:44 -0400 Received: from [192.168.2.103] ([217.82.227.154]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MN1C4-1bZf713rDs-006bxS for ; Wed, 10 Aug 2016 12:52:40 +0200 To: PHP Internals List Message-ID: Date: Wed, 10 Aug 2016 12:52:41 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:hHzW9ndZ9zwFpgLiSQMbhKB6s0eTqrV4WQeGpMihs6MRVJGU94M H1ksxVcbOC7vXRROo1IYqW0fz0vMt86VpMZM0GUr1a93F4JWFcOrMzixWGe6ERw1Uzr8YV1 QqnzTVoQalmg+nGRysYQkfJ37YYqncFBKvrAse3IbjqFtnbCKoZxXRM4e1uHgfnBSG461g9 QnR0FEb73Sa1y3r0W2xSw== X-UI-Out-Filterresults: notjunk:1;V01:K0:xvTKr6RIqFU=:IyN82xNMaf2sZYvQZrEOGm oSG1rzCRxdpOTUXd0J9jHcmMREUi83iAL8AczCn0tkNCRunG0G++WjNTOuDbGr9IuMEiyLx6b dH2ywbWeFAHZSvOeXMNX7zBHJ9N8JQF4QkahUVbVPdLADyUYnTHkQiZ3CfyOxYlFTW5qSmORo FSCW4086rz2xmrzeVbWBAwQ8lYumFTS1uj6Xilct8A8tGfXRTAvmhZRMChNV10GgarU+I+7St rMmd9AU6Yypncayhqu7Z5HM2FaT+f4pyWGF553Fjv/YRdYiDXRDwvT2nmiziPZhegPx4ABAhV GSGJNUPqqjPtCQqU6zT2goWRcCwB6c0tgUK+oeHCh/2ADfvmdEdJebGk+L42qyb/vAV4SAQMI vtRiUZuVHNmoXHthj0sYKcOUUWW9qWY1j9DPLxQnNS2qUDa5oufU04PqE5nY8UMrQjFUesTDg fXWq89fk1V+SRCWk5AuxsCg1mG1j3ztH01BG4R9Hmt/9ieZbb9CG9LlW3k5bbKmiMeowEA6qL BPcwOpBGh2ZmN/thT9ozZyUhUiFwTsyXJzeuDqzR6yz2ABc/K3OeY2VdrEGxbiyPQrKK9oD0B k36uarNSx24IlG1PWFxPxVL9SiPuHFVBJpzlOM5YZlhn+OPdlJTIOA0Y+NPAahf76/sSjZXHz dhtB4O7Gqb8/4dG0rRPjFfb1pmLuSOT9RVevQmBFvjG2tM6xgdwpfl7+Tmw8RP/jElAwept9v 6jHjoAQrpY6znzXboKVcOwnNyVXowo0D0C+NZD2UG13N3dEHBohCv9mZEbCPb4ahZmDeZOiPC 8vQrtoa Subject: GC issue wrt. to resource <-> object cycles? From: cmbecker69@gmx.de ("Christoph M. Becker") Hi! I've tried to fix , and it looks like there's a general GC issue wrt. to resources referencing objects and vice versa. Aren't resource ZVALS put in the root buffer? See , which demonstrates the issue better than the test script in the bug report. A steady increase of allocated memory can be seen, even though gc_collect_cycles() is called. When uncommenting `unset($this->parser);`, everything is fine (the GC wouldn't be involved at all in this case). Wrt. to the PHP 5.6 behavior: this appears fine, but actually it's in error, because of . Not increasing the refcount of `parser->object` might theoretically lead to use-after-free scenarios. -- Christoph M. Becker