summaryrefslogtreecommitdiff
path: root/ext/opcache/ZendAccelerator.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2021-02-10 15:22:09 +0300
committerDmitry Stogov <dmitry@zend.com>2021-02-10 15:22:09 +0300
commit6aea64c44455b78b2ca773b9e082f11fd2734eae (patch)
tree685c817a8a034bae39eb69efbf511d5ffbf4f238 /ext/opcache/ZendAccelerator.c
parent89c55afeb570acaed6c07c404379aed58ca498ed (diff)
downloadphp-git-6aea64c44455b78b2ca773b9e082f11fd2734eae.tar.gz
Reuse single map_ptr slot for indentical class names
Diffstat (limited to 'ext/opcache/ZendAccelerator.c')
-rw-r--r--ext/opcache/ZendAccelerator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 9819e7acdd..49efc3a431 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -505,7 +505,7 @@ zend_string* ZEND_FASTCALL accel_new_interned_string(zend_string *str)
hash_slot = STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), h);
STRTAB_COLLISION(s) = *hash_slot;
*hash_slot = STRTAB_STR_TO_POS(&ZCSG(interned_strings), s);
- GC_SET_REFCOUNT(s, 1);
+ GC_SET_REFCOUNT(s, 2);
GC_TYPE_INFO(s) = GC_STRING | ((IS_STR_INTERNED | IS_STR_PERMANENT) << GC_FLAGS_SHIFT);
ZSTR_H(s) = h;
ZSTR_LEN(s) = ZSTR_LEN(str);