com php-src: Don't keep wrong jump target in last CATCH.: Zend/zend_compile.c
| From: | Dmitry Stogov | Date: | Wed, 18 Nov 2015 21:47:08 +0000 |
| Subject: | com php-src: Don't keep wrong jump target in last CATCH.: Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89904@lists.php.net to get a copy of this message | ||
Commit: 84610b1f3904069f6fc0754c807a3f5cd58a4010
Author: Dmitry Stogov <dmitry@zend.com> Thu, 19 Nov 2015 00:47:08 +0300
Parents: df63ec564e1c054fc9d51144fed6c794aee7569a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=84610b1f3904069f6fc0754c807a3f5cd58a4010
Log:
Don't keep wrong jump target in last CATCH.
Changed paths:
M Zend/zend_compile.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 092c7af..40bdc9f 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -4371,7 +4371,9 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
}
opline = &CG(active_op_array)->opcodes[opnum_catch];
- opline->extended_value = get_next_op_number(CG(active_op_array));
+ if (!is_last_catch) {
+ opline->extended_value = get_next_op_number(CG(active_op_array));
+ }
}
for (i = 0; i < catches->children; ++i) {