From: Nikita Popov Date: Fri, 7 Jul 2017 20:41:48 +0000 (+0200) Subject: Fixed bug #74878 X-Git-Tag: php-7.2.0beta1~122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9069734b57a556a23f977915ee2819477c6d6720;p=php Fixed bug #74878 --- diff --git a/NEWS b/NEWS index 0c10025299..6df4666626 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 ca8b4e2f99..609e8b4a51 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) {