summaryrefslogtreecommitdiff
path: root/ext/opcache/Optimizer/pass2.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2014-12-19 21:40:54 +0100
committerNikita Popov <nikic@php.net>2014-12-19 21:42:42 +0100
commitaa394e70ff8cda63ee4382d2488d80936e5122dc (patch)
tree520f17b724dd31f4aee03a933c625313540bc461 /ext/opcache/Optimizer/pass2.c
parent5fc2fede9c7c963c950d8b96dcc0f7af88b4d695 (diff)
downloadphp-git-aa394e70ff8cda63ee4382d2488d80936e5122dc.tar.gz
Fix bug #67111
Loop variables need to be freed for both "break" and "continue". I'm adding the test to Zend/ because it's good to have a test for this even without opcache.
Diffstat (limited to 'ext/opcache/Optimizer/pass2.c')
-rw-r--r--ext/opcache/Optimizer/pass2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/opcache/Optimizer/pass2.c b/ext/opcache/Optimizer/pass2.c
index 30708a0935..8704b787a9 100644
--- a/ext/opcache/Optimizer/pass2.c
+++ b/ext/opcache/Optimizer/pass2.c
@@ -175,9 +175,9 @@ if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
jmp_to = &op_array->brk_cont_array[array_offset];
array_offset = jmp_to->parent;
if (--nest_levels > 0) {
- if (opline->opcode == ZEND_BRK &&
- (op_array->opcodes[jmp_to->brk].opcode == ZEND_FREE ||
- op_array->opcodes[jmp_to->brk].opcode == ZEND_SWITCH_FREE)) {
+ if (op_array->opcodes[jmp_to->brk].opcode == ZEND_FREE ||
+ op_array->opcodes[jmp_to->brk].opcode == ZEND_SWITCH_FREE
+ ) {
dont_optimize = 1;
break;
}