From: Xinchen Hui Date: Wed, 8 Jul 2015 10:24:27 +0000 (+0800) Subject: Make sure fast_call_var is initialized properly X-Git-Tag: php-7.1.1RC1~35^2~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9e48073b32f0e9652e919affa14933d8372492b;p=php Make sure fast_call_var is initialized properly --- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 062cb1f656..fc66f76694 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -7595,9 +7595,10 @@ ZEND_VM_HANDLER(162, ZEND_FAST_CALL, ANY, ANY) ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]); ZEND_VM_CONTINUE(); } - if (UNEXPECTED(Z_OBJ_P(fast_call) != NULL)) { + if (opline->extended_value == ZEND_FAST_CALL_FROM_FINALLY && UNEXPECTED(Z_OBJ_P(fast_call) != NULL)) { fast_call->u2.lineno = (uint32_t)-1; } else { + Z_OBJ_P(fast_call) = NULL; /* set return address */ fast_call->u2.lineno = opline - EX(func)->op_array.opcodes; } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 391a83bb7a..533fb05bcb 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1607,9 +1607,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CALL_SPEC_HANDLER(ZEND_OP ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]); ZEND_VM_CONTINUE(); } - if (UNEXPECTED(Z_OBJ_P(fast_call) != NULL)) { + if (opline->extended_value == ZEND_FAST_CALL_FROM_FINALLY && UNEXPECTED(Z_OBJ_P(fast_call) != NULL)) { fast_call->u2.lineno = (uint32_t)-1; } else { + Z_OBJ_P(fast_call) = NULL; /* set return address */ fast_call->u2.lineno = opline - EX(func)->op_array.opcodes; }