com php-src: Close all files and resources before before destroying object storage, because resources may point to objects. (THIS CHANGE MAY BE
DANGEROUS): Zend/zend_compile.c Zend/zend_execute_API .c
| From: | Dmitry Stogov | Date: | Thu, 10 Apr 2014 22:22:00 +0000 |
| Subject: | com php-src: Close all files and resources before before destroying object storage, because resources may point to objects. (THIS CHANGE MAY BE DANGEROUS): Zend/zend_compile.c Zend/zend_execute_API .c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77425@lists.php.net to get a copy of this message | ||
Commit: 91ed685e26e0f2e6501ac3c7b49199080bfc47f0
Author: Dmitry Stogov <dmitry@zend.com> Fri, 11 Apr 2014 02:22:00 +0400
Parents: 98350cdceaca6eb16c32903e07486568f54b380d
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=91ed685e26e0f2e6501ac3c7b49199080bfc47f0
Log:
Close all files and resources before before destroying object storage, because resources may point
to objects. (THIS CHANGE MAY BE DANGEROUS)
Changed paths:
M Zend/zend_compile.c
M Zend/zend_execute_API.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 50aff60..fa50a73 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -251,7 +251,6 @@ void shutdown_compiler(TSRMLS_D) /* {{{ */
zend_stack_destroy(&CG(declare_stack));
zend_stack_destroy(&CG(list_stack));
zend_hash_destroy(&CG(filenames_table));
- zend_llist_destroy(&CG(open_files));
zend_hash_destroy(&CG(const_filenames));
zend_stack_destroy(&CG(context_stack));
}
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index cf32139..2ae2bff 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -313,6 +313,14 @@ void shutdown_executor(TSRMLS_D) /* {{{ */
} zend_end_try();
zend_try {
+ zend_llist_destroy(&CG(open_files));
+ } zend_end_try();
+
+ zend_try {
+ zend_close_rsrc_list(&EG(regular_list) TSRMLS_CC);
+ } zend_end_try();
+
+ zend_try {
zend_objects_store_free_object_storage(&EG(objects_store) TSRMLS_CC);
zend_vm_stack_destroy(TSRMLS_C);