Grokbase Groups PHP php-cvs May 2016
FAQ
Commit: f216176bc952bab346ed075b758c7e5eaaacaee0
Author: Dmitry Stogov <dmitry@zend.com> Tue, 31 May 2016 00:04:52 +0300
Parents: 6bd3b8108a49374760f0571a26af9435817378d5
Branches: master

Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f216176bc952bab346ed075b758c7e5eaaacaee0

Log:
Initialize only the necessary fields.

Changed paths:
   M Zend/zend_vm_def.h
   M Zend/zend_vm_execute.h


Diff:
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index c8eb4cb..82ba60a 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -4038,7 +4038,9 @@ ZEND_VM_HANDLER(41, ZEND_GENERATOR_CREATE, ANY, ANY)
    generator = (zend_generator *) Z_OBJ_P(EX(return_value));
    generator->execute_data = gen_execute_data;
    generator->frozen_call_stack = NULL;
- memset(&generator->execute_fake, 0, sizeof(zend_execute_data));
+ generator->execute_fake.opline = NULL;
+ generator->execute_fake.func = NULL;
+ generator->execute_fake.prev_execute_data = NULL;
    ZVAL_OBJ(&generator->execute_fake.This, (zend_object *) generator);

    gen_execute_data->opline = opline + 1;
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 2b9727a..3351a07 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -1179,7 +1179,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_CREATE_SPEC_HANDLER(
    generator = (zend_generator *) Z_OBJ_P(EX(return_value));
    generator->execute_data = gen_execute_data;
    generator->frozen_call_stack = NULL;
- memset(&generator->execute_fake, 0, sizeof(zend_execute_data));
+ generator->execute_fake.opline = NULL;
+ generator->execute_fake.func = NULL;
+ generator->execute_fake.prev_execute_data = NULL;
    ZVAL_OBJ(&generator->execute_fake.This, (zend_object *) generator);

    gen_execute_data->opline = opline + 1;

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-cvs @
categoriesphp
postedMay 30, '16 at 9:05p
activeMay 30, '16 at 9:05p
posts1
users1
websitephp.net

1 user in discussion

Dmitry Stogov: 1 post

People

Translate

site design / logo © 2019 Grokbase