diff options
author | Xinchen Hui <laruence@gmail.com> | 2017-11-02 10:40:45 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2017-11-02 10:40:45 +0800 |
commit | 39845250f242b7739d30b4b8a287b4a6130d8fa1 (patch) | |
tree | 3f8f69284a99f7932989f2460e8d78d1757a34cf /Zend/zend_variables.c | |
parent | a32e567ec8b28a7ccc0ebca9d24911788aaf853c (diff) | |
parent | a7305eb539596e175bd6c3ae9a20953358c5d677 (diff) | |
download | php-git-39845250f242b7739d30b4b8a287b4a6130d8fa1.tar.gz |
Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src:
Made "result", "statement" and "last_message" to always use Zend MM heap. (even for persistent connections these entities don't relive request boundary)
Fixed memory leaks
Use interned strings for "magic" property of internal classes. (not copyied into SHM)
Reverted incomplete fix and too strict asserts.
Mark persistent connection related data as "thread-local".
Persistent resources are "thread-local". Register persistent resources through new functions zend_register_persistent_resource()/zend_register_persistent_resource_ex().
PCRE cache is "thread-local"
Allow reference-counting on "thread-local" persistent zvals
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r-- | Zend/zend_variables.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index 1d3d2a66a7..7ff0916e7c 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -34,9 +34,13 @@ ZEND_API void ZEND_FASTCALL _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC case IS_STRING: { zend_string *str = (zend_string*)p; CHECK_ZVAL_STRING_REL(str); +#if ZEND_RC_DEBUG ZEND_ASSERT(!ZSTR_IS_INTERNED(str)); ZEND_ASSERT(GC_REFCOUNT(str) == 0); pefree(str, GC_FLAGS(str) & IS_STR_PERSISTENT); +#else + zend_string_free(str); +#endif break; } case IS_ARRAY: { |