com php-src: Added test: Zend/tests/gc_036.phpt

From: Date: Tue, 17 Oct 2017 10:45:46 +0000
Subject: com php-src: Added test: Zend/tests/gc_036.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99776@lists.php.net to get a copy of this message
Commit: 801b467c73c5435c83d122549626ae1979b96414 Author: Dmitry Stogov <dmitry@zend.com> Tue, 17 Oct 2017 13:45:46 +0300 Parents: d0f4dbfd9613cbd07e94511b374bd292a3bfd56c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=801b467c73c5435c83d122549626ae1979b96414 Log: Added test Changed paths: A Zend/tests/gc_036.phpt Diff: diff --git a/Zend/tests/gc_036.phpt b/Zend/tests/gc_036.phpt new file mode 100644 index 0000000..67f9a45 --- /dev/null +++ b/Zend/tests/gc_036.phpt @@ -0,0 +1,19 @@ +--TEST-- +GC 036: Memleaks in self-referenced array +--INI-- +zend.enable_gc = 1 +--FILE-- +<?php +function &foo() { + $a = []; + $a[] =& $a; + return $a; +} +function bar() { + gc_collect_cycles(); +} +bar(foo()); +echo "ok\n"; +?> +--EXPECT-- +ok

« previous php.cvs (#99776) next »