mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Disable zend_rc_debug during dtor of dl()'ed module (#8606)
Newly added dl() tests trigger an assertion in ZEND_RC_DEBUG builds. This change disables zend_rc_debug to allows these tests to pass until this issue is resolved.
This commit is contained in:
parent
9bb97ee8bc
commit
6cda01a05c
2 changed files with 16 additions and 0 deletions
|
@ -2948,8 +2948,17 @@ static void clean_module_classes(int module_number) /* {{{ */
|
||||||
|
|
||||||
void module_destructor(zend_module_entry *module) /* {{{ */
|
void module_destructor(zend_module_entry *module) /* {{{ */
|
||||||
{
|
{
|
||||||
|
#if ZEND_RC_DEBUG
|
||||||
|
bool orig_rc_debug = zend_rc_debug;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (module->type == MODULE_TEMPORARY) {
|
if (module->type == MODULE_TEMPORARY) {
|
||||||
|
#if ZEND_RC_DEBUG
|
||||||
|
/* FIXME: Loading extensions during the request breaks some invariants.
|
||||||
|
* In particular, it will create persistent interned strings, which is
|
||||||
|
* not allowed at this stage. */
|
||||||
|
zend_rc_debug = false;
|
||||||
|
#endif
|
||||||
zend_clean_module_rsrc_dtors(module->module_number);
|
zend_clean_module_rsrc_dtors(module->module_number);
|
||||||
clean_module_constants(module->module_number);
|
clean_module_constants(module->module_number);
|
||||||
clean_module_classes(module->module_number);
|
clean_module_classes(module->module_number);
|
||||||
|
@ -2991,6 +3000,10 @@ void module_destructor(zend_module_entry *module) /* {{{ */
|
||||||
DL_UNLOAD(module->handle);
|
DL_UNLOAD(module->handle);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ZEND_RC_DEBUG
|
||||||
|
zend_rc_debug = orig_rc_debug;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,9 @@ PHPAPI PHP_FUNCTION(dl)
|
||||||
|
|
||||||
#if ZEND_RC_DEBUG
|
#if ZEND_RC_DEBUG
|
||||||
bool orig_rc_debug = zend_rc_debug;
|
bool orig_rc_debug = zend_rc_debug;
|
||||||
|
/* FIXME: Loading extensions during the request breaks some invariants. In
|
||||||
|
* particular, it will create persistent interned strings, which is not
|
||||||
|
* allowed at this stage. */
|
||||||
zend_rc_debug = false;
|
zend_rc_debug = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue