mirror of
https://github.com/php/php-src.git
synced 2026-03-31 20:53:00 +02:00
Merge branch 'PHP-7.1'
* PHP-7.1: Prevent optimization of huge functions.
This commit is contained in:
@@ -846,6 +846,11 @@ int zend_build_ssa(zend_arena **arena, const zend_script *script, const zend_op_
|
||||
ALLOCA_FLAG(dfg_use_heap)
|
||||
ALLOCA_FLAG(var_use_heap)
|
||||
|
||||
if ((blocks_count * (op_array->last_var + op_array->T)) > 4 * 1024 * 1024) {
|
||||
/* Don't buld SSA for very big functions */
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
ssa->rt_constants = (build_flags & ZEND_RT_CONSTANTS);
|
||||
ssa_blocks = zend_arena_calloc(arena, blocks_count, sizeof(zend_ssa_block));
|
||||
if (!ssa_blocks) {
|
||||
|
||||
Reference in New Issue
Block a user