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.
This commit is contained in:
Nikita Popov 2019-04-18 10:10:15 +02:00
parent 38f9c8d93d
commit ed4c24274b

View file

@ -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;