From: Nikita Popov Date: Thu, 5 Dec 2019 14:01:51 +0000 (+0100) Subject: Remove CV limitation when determining value from type in SCCP X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0a8c7a8d0b312aae45ef46d27686771fc9297e9;p=php 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. --- 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; }