php-src/Zend/tests/generators/bug65035.phpt
Nikita Popov 0f36224beb Don't try to clean up generator stack on unclean shutdown
This fixes bugs #65035 and #65161. In one of the bugs the issue is
that function_state.arguments is NULL, but the arg count is pushed
to the stack and the code tries to free it. In the other bug the
stack of the generator is freed twice, once in generator_close and
later during shutdown.

It's rather hard (if at all possible) to do a proper stack cleanup
on an unclean shutdown, so I'm just disabling it in this case.
2013-06-29 21:51:54 +02:00

21 lines
188 B
PHP

--TEST--
Bug #65035: yield / exit segfault
--FILE--
<?php
function gen() {
fn();
yield;
}
function fn() {
exit('Done');
}
$gen = gen();
$gen->current();
?>
--EXPECT--
Done