com php-src: function_name might be shared across f ew op_arrays (inherited methods): ext/opcache/z end_persist_calc.c
| From: | Dmitry Stogov | Date: | Tue, 01 Apr 2014 07:29:22 +0000 |
| Subject: | com php-src: function_name might be shared across f ew op_arrays (inherited methods): ext/opcache/z end_persist_calc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77521@lists.php.net to get a copy of this message | ||
Commit: 46647180ef05c797cf2d79b6a80b367028ccaa93
Author: Dmitry Stogov <dmitry@zend.com> Tue, 1 Apr 2014 11:29:22 +0400
Parents: 2a612e91c253b5546e8a2d611f3dd8faa47fec7c
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=46647180ef05c797cf2d79b6a80b367028ccaa93
Log:
function_name might be shared across few op_arrays (inherited methods)
Changed paths:
M ext/opcache/zend_persist_calc.c
Diff:
diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c
index 51b48ec..089b09b 100644
--- a/ext/opcache/zend_persist_calc.c
+++ b/ext/opcache/zend_persist_calc.c
@@ -190,7 +190,15 @@ static uint zend_persist_op_array_calc_ex(zend_op_array *op_array TSRMLS_DC)
}
if (op_array->function_name) {
- ADD_INTERNED_STRING(op_array->function_name, 0);
+ zend_string *old_name = op_array->function_name;
+ zend_string *new_name = zend_shared_alloc_get_xlat_entry(old_name);
+
+ if (new_name) {
+ op_array->function_name = new_name;
+ } else {
+ ADD_INTERNED_STRING(op_array->function_name, 0);
+ zend_shared_alloc_register_xlat_entry(old_name, op_array->function_name);
+ }
}
if (op_array->arg_info &&