mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Fixed compilator bug that might cause jump depended on unitialized value
This commit is contained in:
parent
c05ee74e7f
commit
d4650c5d69
@ -3414,6 +3414,7 @@ void zend_do_begin_class_declaration(const znode *class_token, znode *class_name
|
||||
/* Prefix class name with name of current namespace */
|
||||
znode tmp;
|
||||
|
||||
tmp.op_type = IS_CONST;
|
||||
tmp.u.constant = *CG(current_namespace);
|
||||
zval_copy_ctor(&tmp.u.constant);
|
||||
zend_do_build_namespace_name(&tmp, &tmp, class_name TSRMLS_CC);
|
||||
@ -3529,7 +3530,7 @@ void zend_do_end_class_declaration(const znode *class_token, const znode *parent
|
||||
ce->line_end = zend_get_compiled_lineno(TSRMLS_C);
|
||||
|
||||
if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))
|
||||
&& ((parent_token->op_type != IS_UNUSED) || (ce->num_interfaces > 0))) {
|
||||
&& (parent_token || (ce->num_interfaces > 0))) {
|
||||
zend_verify_abstract_class(ce TSRMLS_CC);
|
||||
if (ce->num_interfaces) {
|
||||
do_verify_abstract_class(TSRMLS_C);
|
||||
|
@ -316,13 +316,13 @@ unticked_class_declaration_statement:
|
||||
implements_list
|
||||
'{'
|
||||
class_statement_list
|
||||
'}' { zend_do_end_class_declaration(&$1, &$2 TSRMLS_CC); }
|
||||
'}' { zend_do_end_class_declaration(&$1, &$3 TSRMLS_CC); }
|
||||
| interface_entry T_STRING
|
||||
{ zend_do_begin_class_declaration(&$1, &$2, NULL TSRMLS_CC); }
|
||||
interface_extends_list
|
||||
'{'
|
||||
class_statement_list
|
||||
'}' { zend_do_end_class_declaration(&$1, &$2 TSRMLS_CC); }
|
||||
'}' { zend_do_end_class_declaration(&$1, NULL TSRMLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user