diff options
author | Xinchen Hui <laruence@php.net> | 2015-07-08 18:24:27 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-07-08 18:24:27 +0800 |
commit | b9e48073b32f0e9652e919affa14933d8372492b (patch) | |
tree | 674c3e06b082741258cccbce682c9627ee95bb7d | |
parent | 249915f938f6880b68ab6c6a47952c509dc51604 (diff) | |
download | php-git-b9e48073b32f0e9652e919affa14933d8372492b.tar.gz |
Make sure fast_call_var is initialized properly
-rw-r--r-- | Zend/zend_vm_def.h | 3 | ||||
-rw-r--r-- | 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; } |