]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.0' into PHP-7.1
authorXinchen Hui <laruence@gmail.com>
Mon, 8 May 2017 03:32:27 +0000 (11:32 +0800)
committerXinchen Hui <laruence@gmail.com>
Mon, 8 May 2017 03:32:27 +0000 (11:32 +0800)
* PHP-7.0:
  Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())

1  2 
Zend/zend_compile.c

index 98e75c500c5d983bd7fc211200e1eaedcb05a265,7fe8815e8116e1d2ccf209fd115ada4234aefe50..27d4a7bb045ff27461b8b6edd7acb6fa1c5cd391
@@@ -7370,12 -6669,13 +7370,15 @@@ void zend_compile_class_const(znode *re
                return;
        }
  
-       zend_eval_const_expr(&class_ast);
-       zend_eval_const_expr(&const_ast);
+       zend_eval_const_expr(&ast->child[0]);
+       zend_eval_const_expr(&ast->child[1]);
+       class_ast = ast->child[0];
+       const_ast = ast->child[1];
  
        if (class_ast->kind == ZEND_AST_ZVAL) {
 +              zend_string *resolved_name;
 +
                resolved_name = zend_resolve_class_name_ast(class_ast);
                if (const_ast->kind == ZEND_AST_ZVAL && zend_try_ct_eval_class_const(&result->u.constant, resolved_name, zend_ast_get_str(const_ast))) {
                        result->op_type = IS_CONST;