summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2017-03-17 12:54:11 +0100
committerNikita Popov <nikita.ppv@gmail.com>2017-03-17 12:54:11 +0100
commitd3aac6f81037ca4870cacda04650198a43118944 (patch)
tree8c5f3c25ecdd777eeed44c3de7e6a362b215c665
parent37da80bf19ca29e923aa803fab8c1b7c4844f2ed (diff)
parent7ea261685f179a7cddcc4196fc7f3f12572c3d49 (diff)
downloadphp-git-d3aac6f81037ca4870cacda04650198a43118944.tar.gz
Merge branch 'PHP-7.1'
-rw-r--r--ext/opcache/Optimizer/block_pass.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 542172314f..a7c8897c3f 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -1784,6 +1784,11 @@ void zend_optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx)
return;
}
+ if (cfg.blocks_count * (op_array->last_var + op_array->T) > 64 * 1024 * 1024) {
+ zend_arena_release(&ctx->arena, checkpoint);
+ return;
+ }
+
if (ctx->debug_level & ZEND_DUMP_BEFORE_BLOCK_PASS) {
zend_dump_op_array(op_array, ZEND_DUMP_CFG, "before block pass", &cfg);
}