com php-src: Fixed ZTS build (disable deallocation of arg_info of internal functions with type hints) : Zend/zend_opcode.c
| From: | Dmitry Stogov | Date: | Wed, 13 Sep 2017 07:10:56 +0000 |
| Subject: | com php-src: Fixed ZTS build (disable deallocation of arg_info of internal functions with type hints) : Zend/zend_opcode.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99409@lists.php.net to get a copy of this message | ||
Commit: 168ec3a6e18ecd84dc1201bfd4eed9cc3ecfa1a4
Author: Dmitry Stogov <dmitry@zend.com> Wed, 13 Sep 2017 10:10:56 +0300
Parents: a84608d4e248e0b4e5fe940cd397d19f8d3a8396
Branches: PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=168ec3a6e18ecd84dc1201bfd4eed9cc3ecfa1a4
Log:
Fixed ZTS build (disable deallocation of arg_info of internal functions with type hints)
Changed paths:
M Zend/zend_opcode.c
Diff:
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index aac18b9..e89a388 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -142,6 +142,7 @@ ZEND_API void zend_function_dtor(zval *zv)
ZEND_ASSERT(function->type == ZEND_INTERNAL_FUNCTION);
ZEND_ASSERT(function->common.function_name);
zend_string_release(function->common.function_name);
+#ifndef ZTS
if ((function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))
&&
!function->common.scope && function->common.arg_info) {
@@ -159,6 +160,7 @@ ZEND_API void zend_function_dtor(zval *zv)
}
free(arg_info);
}
+#endif
if (!(function->common.fn_flags & ZEND_ACC_ARENA_ALLOCATED)) {
pefree(function, 1);
}
@@ -244,7 +246,9 @@ ZEND_API void destroy_zend_class(zval *zv)
{
zend_property_info *prop_info;
zend_class_entry *ce = Z_PTR_P(zv);
+#ifndef ZTS
zend_function *fn;
+#endif
if (--ce->refcount > 0) {
return;
@@ -328,6 +332,7 @@ ZEND_API void destroy_zend_class(zval *zv)
}
zend_hash_destroy(&ce->properties_info);
zend_string_release(ce->name);
+#ifndef ZTS
ZEND_HASH_FOREACH_PTR(&ce->function_table, fn) {
if ((fn->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))
&&
fn->common..scope == ce) {
@@ -335,6 +340,7 @@ ZEND_API void destroy_zend_class(zval *zv)
fn->common.scope = NULL;
}
} ZEND_HASH_FOREACH_END();
+#endif
zend_hash_destroy(&ce->function_table);
if (zend_hash_num_elements(&ce->constants_table)) {
zend_class_constant *c;