ID:               23872
 Comment by:       php at codewhore dot org
 Reported By:      Xuefer at 21cn dot com
 Status:           Wont fix
 Bug Type:         Scripting Engine problem
 Operating System: win2k apache2
 PHP Version:      4.3.2
 New Comment:

According to zend.h, the refcount for zvals is an unsigned short, which
would roll over to zero on the 65536th increment, causing
shutdown_memory_manager to free the zval while references to it still
remain.

I'm guessing it'd be too costly to check every refcount increment.


Previous Comments:
------------------------------------------------------------------------

[2003-05-29 07:51:37] [EMAIL PROTECTED]

That breaks - don't do it :)
It won't be fixed in 4.x; PHP 5 will (and does) handle it though.


------------------------------------------------------------------------

[2003-05-29 07:37:02] Xuefer at 21cn dot com

php4.3.2-rc3
<?php
$times = 65536; // 65535 works fine
$t = array(1);
for ($i = 0; $i < $times; $i ++)
{
        $a[] = &$t;
}
?>
crash

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23872&edit=1

Reply via email to