From 15be5f0b4a82d06f9c626fe05e42a9801a117c64 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Mon, 12 Apr 1999 18:40:18 +0000 Subject: [PATCH] Destroy the resource list after destroying the symbol table, otherwise the auto-destructor for resources are run when the resource list is no longer valid --- Zend/zend_compile.c | 1 - Zend/zend_execute_API.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index f29c33f024..5d16f370c1 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -78,7 +78,6 @@ void shutdown_compiler(CLS_D) zend_llist_destroy(&CG(filenames_list)); zend_hash_apply(CG(function_table), (int (*)(void *)) is_not_internal_function); zend_hash_apply(CG(class_table), (int (*)(void *)) is_not_internal_class); - destroy_resource_list(); zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup); } diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 1600be6e54..a544597bfa 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -126,6 +126,8 @@ void shutdown_executor(ELS_D) zend_hash_destroy(&EG(symbol_table)); + destroy_resource_list(); /* must be destroyed after the main symbol table is destroyed */ + zend_ptr_stack_destroy(&EG(argument_stack)); if (EG(main_op_array)) { destroy_op_array(EG(main_op_array)); -- 2.40.0