com php-src: Fixed zend_string related inconsistencies: Zend/zend_string.c Zend/zend_string.h ext/opcach e/ZendAccelerator.c

From: Date: Tue, 21 Apr 2015 20:26:34 +0000
Subject: com php-src: Fixed zend_string related inconsistencies: Zend/zend_string.c Zend/zend_string.h ext/opcach e/ZendAccelerator.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86423@lists.php.net to get a copy of this message
Commit: a0c07c90f248ffdf11ee8bdf9309107f5776bf54 Author: Dmitry Stogov <dmitry@zend.com> Tue, 21 Apr 2015 23:26:34 +0300 Parents: 76b1d755fc7778f80455b1bfb8ccc009083974c1 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a0c07c90f248ffdf11ee8bdf9309107f5776bf54 Log: Fixed zend_string related inconsistencies Changed paths: M Zend/zend_string.c M Zend/zend_string.h M ext/opcache/ZendAccelerator.c Diff: diff --git a/Zend/zend_string.c b/Zend/zend_string.c index f203045..e8685a4 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -53,6 +53,7 @@ void zend_interned_strings_init(void) CG(interned_strings).nTableMask = -CG(interned_strings).nTableSize; HT_SET_DATA_ADDR(&CG(interned_strings), pemalloc(HT_SIZE(&CG(interned_strings)), 1)); HT_HASH_RESET(&CG(interned_strings)); + CG(interned_strings).u.flags |= HASH_FLAG_INITIALIZED; /* interned empty string */ str = zend_string_alloc(sizeof("")-1, 1); diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 97528a7..0774646 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -44,6 +44,7 @@ END_EXTERN_C() #define STR_ALLOCA_ALLOC(str, _len, use_heap) do { \ (str) = (zend_string *)do_alloca(ZEND_MM_ALIGNED_SIZE(_STR_HEADER_SIZE + (_len) + 1), (use_heap)); \ GC_REFCOUNT(str) = 1; \ + GC_TYPE_INFO(str) = IS_STRING; \ (str)->h = 0; \ (str)->len = (_len); \ } while (0) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 8577ba3..8259cfa 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -466,6 +466,7 @@ static void accel_use_shm_interned_strings(void) auto_global = (zend_auto_global*)Z_PTR(p->val);; + zend_string_addref(auto_global->name); auto_global->name = accel_new_interned_string(auto_global->name); if (p->key) { p->key = accel_new_interned_string(p->key);

« previous php.cvs (#86423) next »