summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/opcache/Optimizer/block_pass.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 34dc008a6d..b36b68dc05 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -119,6 +119,10 @@ static void strip_nops(zend_op_array *op_array, zend_basic_block *b)
strip_leading_nops(op_array, b);
}
+ if (b->len == 0) {
+ return;
+ }
+
/* strip the inside NOPs */
i = j = b->start + 1;
while (i < b->start + b->len) {