com php-src: Add missing call opcodes in cleanup_unfinished _calls(): Zend/zend_execute.c
| From: | Nikita Popov | Date: | Thu, 14 Jul 2016 16:37:28 +0000 |
| Subject: | com php-src: Add missing call opcodes in cleanup_unfinished _calls(): Zend/zend_execute.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93022@lists.php.net to get a copy of this message | ||
Commit: 82ce2a4e4dabb011230370a110218995b7e50343
Author: Nikita Popov <nikic@php.net> Wed, 13 Jul 2016 23:55:19 +0200
Parents: 5063b5aea16a512794e482a4a0b660b018f3f60b
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=82ce2a4e4dabb011230370a110218995b7e50343
Log:
Add missing call opcodes in cleanup_unfinished_calls()
Otherwise we may leak if an exception is thrown from them.
Changed paths:
M Zend/zend_execute.c
Diff:
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index cda98fd..af90b44 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -2444,9 +2444,12 @@ static void cleanup_unfinished_calls(zend_execute_data *execute_data,
uint32_t o
if (UNEXPECTED(opline->opcode == ZEND_INIT_FCALL ||
opline->opcode == ZEND_INIT_FCALL_BY_NAME ||
+ opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME ||
opline->opcode == ZEND_INIT_DYNAMIC_CALL ||
+ opline->opcode == ZEND_INIT_USER_CALL ||
opline->opcode == ZEND_INIT_METHOD_CALL ||
- opline->opcode == ZEND_INIT_STATIC_METHOD_CALL)) {
+ opline->opcode == ZEND_INIT_STATIC_METHOD_CALL ||
+ opline->opcode == ZEND_NEW)) {
ZEND_ASSERT(op_num);
opline--;
}