summaryrefslogtreecommitdiff
path: root/ext/opcache/Optimizer
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2018-03-15 11:17:00 +0800
committerXinchen Hui <laruence@gmail.com>2018-03-15 11:17:00 +0800
commit4758164ac5fd61be70d9366175b30df758ac8262 (patch)
treeebe7f17ebca4985937950dfb6fe23ce6981a4167 /ext/opcache/Optimizer
parent84881c654e0e704c2d198b894d3c2758523dfe2d (diff)
downloadphp-git-4758164ac5fd61be70d9366175b30df758ac8262.tar.gz
Fixed bug #76094 (Access violation when using opcache)
Diffstat (limited to 'ext/opcache/Optimizer')
-rw-r--r--ext/opcache/Optimizer/dce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/opcache/Optimizer/dce.c b/ext/opcache/Optimizer/dce.c
index 358870beaf..c146599a35 100644
--- a/ext/opcache/Optimizer/dce.c
+++ b/ext/opcache/Optimizer/dce.c
@@ -356,7 +356,8 @@ static zend_bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) {
if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))&& !is_var_dead(ctx, ssa_op->op1_use)) {
if (!try_remove_var_def(ctx, ssa_op->op1_use, ssa_op->op1_use_chain, opline)) {
- if (ssa->var_info[ssa_op->op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) {
+ if (ssa->var_info[ssa_op->op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)
+ && opline->opcode != ZEND_CASE) {
free_var = ssa_op->op1_use;
free_var_type = opline->op1_type;
}