mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
388624d359
and they will leak and cause failures unless gc is enabled
43 lines
628 B
PHP
43 lines
628 B
PHP
--TEST--
|
|
GC 032: Crash in GC because of invalid reference counting
|
|
--INI--
|
|
zend.enable_gc=1
|
|
--FILE--
|
|
<?php
|
|
$a = array();
|
|
$b =& $a;
|
|
$a[0] = $a;
|
|
debug_zval_dump($a);
|
|
$a = array(array());
|
|
$b =& $a;
|
|
$a[0][0] = $a;
|
|
debug_zval_dump($a);
|
|
?>
|
|
--EXPECTF--
|
|
array(1) refcount(%d){
|
|
[0]=>
|
|
array(1) refcount(%d){
|
|
[0]=>
|
|
array(1) refcount(%d){
|
|
[0]=>
|
|
*RECURSION*
|
|
}
|
|
}
|
|
}
|
|
array(1) refcount(%d){
|
|
[0]=>
|
|
array(1) refcount(%d){
|
|
[0]=>
|
|
array(1) refcount(%d){
|
|
[0]=>
|
|
array(1) refcount(%d){
|
|
[0]=>
|
|
array(1) refcount(%d){
|
|
[0]=>
|
|
*RECURSION*
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|