]> granicus.if.org Git - php/commitdiff
Fixed bug #74878 (Data race in ZTS builds)
authorDmitry Stogov <dmitry@zend.com>
Mon, 18 Sep 2017 08:27:10 +0000 (11:27 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 18 Sep 2017 08:27:10 +0000 (11:27 +0300)
NEWS
Zend/zend_API.c

diff --git a/NEWS b/NEWS
index 7bcbf87525bd6a0796db1daef399220931bb93d8..388adab738569a5506cf778ed91a7cf336030153 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? ????, PHP 7.2.0RC3
 
+- Core
+  . Fixed bug #74878 (Data race in ZTS builds). (Nikita, Dmitry)
+
 - MySQLi:
   . Fixed bug #75018 (Data corruption when reading fields of bit type). (Anatol)
 
index ca8b4e2f9974f43ce4e3105f374410d8bcc4fc34..7c82d6ec256a73fdb346e63963e67505d427c693 100644 (file)
@@ -3741,7 +3741,11 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, z
                        default:
                                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) {