com php-src: Order live ranges according to "start" position: Zend/tests/temporary_cleaning_016.phpt Zend/zend _compile.c
| From: | Dmitry Stogov | Date: | Mon, 14 Aug 2017 09:21:07 +0000 |
| Subject: | com php-src: Order live ranges according to "start" position: Zend/tests/temporary_cleaning_016.phpt Zend/zend _compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99010@lists.php.net to get a copy of this message | ||
Commit: a80e462fbdb1562ac2c3163ef2929bd229aa62db
Author: Dmitry Stogov <dmitry@zend.com> Mon, 14 Aug 2017 12:21:07 +0300
Parents: cd6893aed11d3368eaf10a0676031ee2608c7559
Branches: PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a80e462fbdb1562ac2c3163ef2929bd229aa62db
Log:
Order live ranges according to "start" position
Changed paths:
A Zend/tests/temporary_cleaning_016.phpt
M Zend/zend_compile.c
Diff:
diff --git a/Zend/tests/temporary_cleaning_016.phpt b/Zend/tests/temporary_cleaning_016.phpt
new file mode 100644
index 0000000..40d8658
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_016.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Live ranges should be ordered according to "start" position
+--FILE--
+<?php
+set_error_handler(function($no, $msg) { throw new Exception; });
+
+try {
+ $a = [];
+ $str = "$a${"y$a$a"}y";
+} catch (Exception $e) {
+ echo "Exception\n";
+}
+?>
+DONE
+--EXPECT--
+DONE
+
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index e1d7b89...0772bc4 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -7844,7 +7844,7 @@ static void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */
GET_NODE(result, opline->result);
} else {
uint32_t var;
- uint32_t range = zend_start_live_range(CG(active_op_array), rope_init_lineno);
+ uint32_t range = zend_start_live_range_ex(CG(active_op_array), rope_init_lineno);
init_opline->extended_value = j;
opline->opcode = ZEND_ROPE_END;