Re: com php-src: Fixed bug #74878: NEWS Zend/zend_API.c

From: Date: Mon, 10 Jul 2017 08:08:22 +0000
Subject: Re: com php-src: Fixed bug #74878: NEWS Zend/zend_API.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-98486@lists.php.net to get a copy of this message
This commit introduced a lot of memory leaks. Probably, you meant string interning only for internal classes. Even for internal classes only, this may require additional changes in opcache, that copies interned strings into shared memory. It's better to revert this, before complete fix. Thanks. Dmitry. ________________________________ From: Nikita Popov <nikic@php.net> Sent: Friday, July 7, 2017 11:41:48 PM To: php-cvs@lists.php.net Subject: [PHP-CVS] com php-src: Fixed bug #74878: NEWS Zend/zend_API.c Commit: 9069734b57a556a23f977915ee2819477c6d6720 Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 7 Jul 2017 22:41:48 +0200 Parents: 134047dfde1feaf664b54bb2f84324a38eced091 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9069734b57a556a23f977915ee2819477c6d6720 Log: Fixed bug #74878 Bugs: https://bugs.php.net/74878 Changed paths: M NEWS M Zend/zend_API.c Diff: diff --git a/NEWS b/NEWS index 0c10025..6df4666 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ PHP NEWS unserialize). (Nikita) . Fixed bug #74819 (wddx_deserialize() heap out-of-bound read via php_parse_date()). (Derick) + . Fixed bug #74878 (Data race in ZTS builds). (Nikita) - EXIF: . Fixed bug #74428 (exif_read_data(): "Illegal IFD size" warning occurs with diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ca8b4e2..609e8b4 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3742,6 +3742,10 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, z break; } } + + /* Must be interned to avoid ZTS data races */ + name = zend_new_interned_string(zend_string_copy(name)); + if (access_type & ZEND_ACC_PUBLIC) { property_info->name = zend_string_copy(name); } else if (access_type & ZEND_ACC_PRIVATE) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.cvs (#98486) next »