com php-src: Do not mark automatic return 1; as executable: sapi/phpdbg/phpdbg.c
| From: | Bob Weinand | Date: | Fri, 31 Jul 2015 00:26:28 +0000 |
| Subject: | com php-src: Do not mark automatic return 1; as executable: sapi/phpdbg/phpdbg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88248@lists.php.net to get a copy of this message | ||
Commit: 36aa92a67ddeaa73754274b05f0ed35006b18ebc
Author: Bob Weinand <bobwei9@hotmail.com> Fri, 31 Jul 2015 02:26:28 +0200
Parents: 1da4ee25b89a668d55064f6cbfd62fcf1c9d00ef
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=36aa92a67ddeaa73754274b05f0ed35006b18ebc
Log:
Do not mark automatic return 1; as executable
Changed paths:
M sapi/phpdbg/phpdbg.c
Diff:
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 874704b..ca86a29 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -432,7 +432,9 @@ static void phpdbg_oplog_fill_executable(zend_op_array *op_array, HashTable *ins
ZVAL_LONG(&zero, 0);
/* ignore autogenerated return (well, not too precise with finally branches, but that's okay)
*/
- if (op_array->last > 1 && (end - 1)->opcode == ZEND_RETURN && ((end -
2)->opcode == ZEND_RETURN || (end - 2)->opcode == ZEND_GENERATOR_RETURN || (end -
2)->opcode == ZEND_THROW)) {
+ if (op_array->last >= 1 && (end - 1)->opcode == ZEND_RETURN
+ && ((op_array->last > 1 && ((end - 2)->opcode == ZEND_RETURN || (end -
2)->opcode == ZEND_GENERATOR_RETURN || (end - 2)->opcode == ZEND_THROW))
+ || op_array->function_name == NULL)) {
end--;
}