mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
22 lines
393 B
PHP
22 lines
393 B
PHP
--TEST--
|
|
Bug GH-9801 (Crash when memory limit is exceeded during generator initialization)
|
|
--INI--
|
|
memory_limit=16m
|
|
--SKIPIF--
|
|
<?php
|
|
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
|
if ($zend_mm_enabled === "0") {
|
|
die("skip Zend MM disabled");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
function a() {
|
|
yield from a();
|
|
}
|
|
|
|
foreach(a() as $v);
|
|
--EXPECTF--
|
|
Fatal error: Allowed memory size of %d bytes exhausted %s
|