From b9e48073b32f0e9652e919affa14933d8372492b Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 8 Jul 2015 18:24:27 +0800 Subject: [PATCH] Make sure fast_call_var is initialized properly --- Zend/zend_vm_def.h | 3 ++- Zend/zend_vm_execute.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.50.1