mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
update NEWS
Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036)
Fix typo from commit 32314f6b6
Fix destruction order in zend_shutdown (bug #65463, #66036)
This commit is contained in:
commit
57f82819e9
5
NEWS
5
NEWS
@ -4,10 +4,13 @@ PHP NEWS
|
||||
?? ??? 2014, PHP 5.6.1
|
||||
|
||||
- Core:
|
||||
. Implemented FR #38409 (parse_ini_file() looses the type of booleans). (Tjerk)
|
||||
. Fixed bug #65463 (SIGSEGV during zend_shutdown()). (Keyur Govande)
|
||||
. Fixed bug #66036 (Crash on SIGTERM in apache process). (Keyur Govande)
|
||||
. Fixed bug #67878 (program_prefix not honoured in man pages). (Remi)
|
||||
. Fixed bug #67938 (Segfault when extending interface method with variadic).
|
||||
(Nikita)
|
||||
. Implemented FR #38409 (parse_ini_file() looses the type of booleans). (Tjerk)
|
||||
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #67731 (finfo::file() returns invalid mime type
|
||||
|
14
Zend/zend.c
14
Zend/zend.c
@ -822,6 +822,20 @@ void zend_shutdown(TSRMLS_D) /* {{{ */
|
||||
zend_shutdown_timeout_thread();
|
||||
#endif
|
||||
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
|
||||
|
||||
if (EG(active))
|
||||
{
|
||||
/*
|
||||
* The order of destruction is important here.
|
||||
* See bugs #65463 and 66036.
|
||||
*/
|
||||
zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
|
||||
zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) zend_cleanup_user_class_data TSRMLS_CC);
|
||||
zend_cleanup_internal_classes(TSRMLS_C);
|
||||
zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) clean_non_persistent_function_full TSRMLS_CC);
|
||||
zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) clean_non_persistent_class_full TSRMLS_CC);
|
||||
}
|
||||
|
||||
zend_destroy_modules();
|
||||
|
||||
virtual_cwd_deactivate(TSRMLS_C);
|
||||
|
@ -686,6 +686,8 @@ ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC);
|
||||
ZEND_API void zend_cleanup_internal_classes(TSRMLS_D);
|
||||
ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC);
|
||||
ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC);
|
||||
ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC);
|
||||
ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC);
|
||||
|
||||
ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC);
|
||||
ZEND_API void zend_function_dtor(zend_function *function);
|
||||
|
@ -109,7 +109,7 @@ static int clean_non_persistent_function(zend_function *function TSRMLS_DC) /* {
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
|
||||
ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
|
||||
}
|
||||
@ -121,7 +121,7 @@ static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
|
||||
ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user