mirror of
https://github.com/php/php-src.git
synced 2024-09-29 05:46:06 +00:00
0f36224beb
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.
21 lines
188 B
PHP
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
|