Avoids a stack overflow in Zend/tests/runtime_compile_time_binary_operands.php
that happens in recursive RPO calculation. We could make that code
non-recursive, but I don't think it makes sense to JIT this kind of
function in the first place.
return FAILURE;
}
+ /* Don't JIT huge functions. Apart from likely being detrimental due to the amount of
+ * generated code, some of our analysis is recursive and will stack overflow with many
+ * blocks. */
+ if (cfg->blocks_count > 100000) {
+ return FAILURE;
+ }
+
if (zend_cfg_build_predecessors(&CG(arena), cfg) != SUCCESS) {
return FAILURE;
}