From: Nikita Popov Date: Thu, 18 Apr 2019 08:10:15 +0000 (+0200) Subject: Fix dl() module unloading in post deactivate X-Git-Tag: php-7.4.0alpha1~470 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed4c24274bc45aae3b18f26d19db06b42624ecdf;p=php Fix dl() module unloading in post deactivate FOREACH_END_DEL() does not call the destructor by itself, we need to explicitly call it. Due to the missing dtor call the functions were not unregistered early, which resulted in later shutdown segfaults. --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 33d74db1a6..fbac5e47ec 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2608,6 +2608,7 @@ ZEND_API void zend_post_deactivate_modules(void) /* {{{ */ if (module->type != MODULE_TEMPORARY) { break; } + module_destructor(module); } ZEND_HASH_FOREACH_END_DEL(); } else { zend_module_entry **p = module_post_deactivate_handlers;