From e0a8c7a8d0b312aae45ef46d27686771fc9297e9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 5 Dec 2019 15:01:51 +0100 Subject: [PATCH] Remove CV limitation when determining value from type in SCCP As far as I can determine, this is no longer a problem: We will not try to remove the defining instructions (this is only done if the value is known by SCCP itself) and we also only determine non-refcounted values in this way, so it is not a problem if the FREE is omitted. --- ext/opcache/Optimizer/sccp.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c index 9c21f35d70..0c62e1bd0d 100644 --- a/ext/opcache/Optimizer/sccp.c +++ b/ext/opcache/Optimizer/sccp.c @@ -2164,11 +2164,6 @@ static zval *value_from_type_and_range(sccp_ctx *ctx, int var_num, zval *tmp) { zend_ssa *ssa = ctx->scdf.ssa; zend_ssa_var_info *info = &ssa->var_info[var_num]; - if (ssa->vars[var_num].var >= ctx->scdf.op_array->last_var) { - // TODO Non-CVs may cause issues with FREEs - return NULL; - } - if (info->type & MAY_BE_UNDEF) { return NULL; } -- 2.50.1