Arquivos
hhvm/hphp/test/quick/stack_overflow.php
T
mwilliams 9e35396b7f Fix some stack overflow bugs
If re-entry triggers stack overflow, there is no FCall or FCallArray,
so the code to find the pc in REQ_STACK_OVERFLOW would fail. If it
managed to get through there, it would then try to DecRef the contents
of an ActRec, sometimes causing it to DecRef a Func.

In addition, if a "leaf" function resulted in re-entry we didn't
necessarily check the stack.

Differential Revision: D936843
2013-08-21 09:33:12 -07:00

15 linhas
140 B
PHP

<?php
$g = array(1,2,3);
function cmp($a, $b) {
global $g;
usort($g, 'cmp');
fiz();
}
cmp(0, 0);
function fiz() {
var_dump(1);
}