Skip to content

Commit f26bcfc

Browse files
committed
Disable zend_rc_debug during dtor of dl()'ed module
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.
1 parent 3d53e59 commit f26bcfc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Zend/zend_API.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,8 +2948,14 @@ static void clean_module_classes(int module_number) /* {{{ */
29482948

29492949
void module_destructor(zend_module_entry *module) /* {{{ */
29502950
{
2951+
#if ZEND_RC_DEBUG
2952+
bool orig_rc_debug = zend_rc_debug;
2953+
#endif
29512954

29522955
if (module->type == MODULE_TEMPORARY) {
2956+
#if ZEND_RC_DEBUG
2957+
zend_rc_debug = false;
2958+
#endif
29532959
zend_clean_module_rsrc_dtors(module->module_number);
29542960
clean_module_constants(module->module_number);
29552961
clean_module_classes(module->module_number);
@@ -2991,6 +2997,10 @@ void module_destructor(zend_module_entry *module) /* {{{ */
29912997
DL_UNLOAD(module->handle);
29922998
}
29932999
#endif
3000+
3001+
#if ZEND_RC_DEBUG
3002+
zend_rc_debug = orig_rc_debug;
3003+
#endif
29943004
}
29953005
/* }}} */
29963006

0 commit comments

Comments
 (0)