com php-src: Fix assert() in EXT mode: Zend/zend_opcode.c
| From: | Nikita Popov | Date: | Fri, 25 Mar 2016 18:27:20 +0000 |
| Subject: | com php-src: Fix assert() in EXT mode: Zend/zend_opcode.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91479@lists.php.net to get a copy of this message | ||
Commit: 6c47455f73405658ae0ccd4e9d9da812080e8c83
Author: Nikita Popov <nikic@php.net> Fri, 25 Mar 2016 19:27:20 +0100
Parents: 8e5b139732893d2a5f6ba3ae0a0b2b5cf6dba09f
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6c47455f73405658ae0ccd4e9d9da812080e8c83
Log:
Fix assert() in EXT mode
Changed paths:
M Zend/zend_opcode.c
Diff:
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 4800939..6c1488a 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -678,12 +678,18 @@ ZEND_API int pass_two(zend_op_array *op_array)
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2);
break;
case ZEND_ASSERT_CHECK:
+ {
/* If result of assert is unused, result of check is unused as well */
- if (op_array->opcodes[opline->op2.opline_num - 1].result_type == IS_UNUSED) {
+ zend_op *call = &op_array->opcodes[opline->op2.opline_num - 1];
+ if (call->opcode == ZEND_EXT_FCALL_END) {
+ call--;
+ }
+ if (call->result_type == IS_UNUSED) {
opline->result_type = IS_UNUSED;
}
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2);
break;
+ }
case ZEND_DECLARE_ANON_CLASS:
case ZEND_DECLARE_ANON_INHERITED_CLASS:
case ZEND_CATCH: