|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-10-24 15:40 UTC] jani@php.net
[2008-10-24 15:41 UTC] jani@php.net
[2008-10-27 10:52 UTC] dmitry@php.net
[2008-11-04 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 17:00:01 2025 UTC |
Description: ------------ Incorrect reference counting in: ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV) refcount is decremented twice. (In short: ZEND_RETURNS_FUNCTION for "new" is missing). It's fixed in 5.3.0alpha1 with ZEND_RETURNS_NEW. But it will be nice to have it also in stable version. Reproduce code: --------------- <? class A{ function A() { global $g; $g[0] = $g[1] = $this; } function __destruct() { } } $g = array(); for($i=0; $i<1000; ++$i) { $a =& new A; } ?> Expected result: ---------------- Exit without any errors. Actual result: -------------- Segmentation fault