Skip to content

Commit 8db817e

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 8db817e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Zend/zend_API.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,8 +2948,12 @@ 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+
zend_rc_debug = false;
29532957
zend_clean_module_rsrc_dtors(module->module_number);
29542958
clean_module_constants(module->module_number);
29552959
clean_module_classes(module->module_number);
@@ -2991,6 +2995,10 @@ void module_destructor(zend_module_entry *module) /* {{{ */
29912995
DL_UNLOAD(module->handle);
29922996
}
29932997
#endif
2998+
2999+
#if ZEND_RC_DEBUG
3000+
zend_rc_debug = orig_rc_debug;
3001+
#endif
29943002
}
29953003
/* }}} */
29963004

0 commit comments

Comments
 (0)