com php-src: Make sure fast_call_var is initialized p roperly: Zend/zend_vm_def.h Zend/zend_vm_execut e.h
| From: | Xinchen Hui | Date: | Wed, 08 Jul 2015 10:24:27 +0000 |
| Subject: | com php-src: Make sure fast_call_var is initialized p roperly: Zend/zend_vm_def.h Zend/zend_vm_execut e.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87845@lists.php.net to get a copy of this message | ||
Commit: b9e48073b32f0e9652e919affa14933d8372492b
Author: Xinchen Hui <laruence@php.net> Wed, 8 Jul 2015 18:24:27 +0800
Parents: 249915f938f6880b68ab6c6a47952c509dc51604
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b9e48073b32f0e9652e919affa14933d8372492b
Log:
Make sure fast_call_var is initialized properly
Changed paths:
M Zend/zend_vm_def.h
M Zend/zend_vm_execute.h
Diff:
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 062cb1f..fc66f76 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 391a83b..533fb05 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;
}