com php-src: Avoid possible conditional jump depended on uninitialised value: ext/opcache/Optimizer/block_pass.c
| From: | Dmitry Stogov | Date: | Mon, 29 Apr 2013 06:45:31 +0000 |
| Subject: | com php-src: Avoid possible conditional jump depended on uninitialised value: ext/opcache/Optimizer/block_pass.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72058@lists.php.net to get a copy of this message | ||
Commit: 4b83f4a01144d6e3308604a5e3742305f8c10552
Author: Dmitry Stogov <dmitry@zend.com> Mon, 29 Apr 2013 10:45:31 +0400
Parents: a5b4eeb5f02084e10913153a4dc5888ce4b43925
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4b83f4a01144d6e3308604a5e3742305f8c10552
Log:
Avoid possible conditional jump depended on uninitialised value
Changed paths:
M ext/opcache/Optimizer/block_pass.c
Diff:
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 4dbb7c5..b8c3814 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -1257,14 +1257,15 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array)
}
cur_block = cur_block->next;
}
-#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO
- if (opline[-1].opcode == ZEND_THROW) {
+
+ if ((opline-1)->opcode == ZEND_THROW) {
/* if we finished with THROW, we need to add space between THROW and HANDLE to not confuse
zend_throw_internal */
MAKE_NOP(opline);
opline->lineno = opline[-1]..lineno;
opline++;
}
+#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO
MAKE_NOP(opline);
opline->opcode = ZEND_HANDLE_EXCEPTION;
opline->lineno = opline[-1].lineno;