From b02d1c5efd3797262db82d92f8136ea6ecd2120d Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 13 May 2022 23:25:40 +0200 Subject: [PATCH] Disable zend_rc_debug during dl() 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. --- ext/standard/dl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 77d296ced77a9..40608c9ec7ae5 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -58,10 +58,19 @@ PHPAPI PHP_FUNCTION(dl) RETURN_FALSE; } +#if ZEND_RC_DEBUG + bool orig_rc_debug = zend_rc_debug; + zend_rc_debug = false; +#endif + php_dl(filename, MODULE_TEMPORARY, return_value, 0); if (Z_TYPE_P(return_value) == IS_TRUE) { EG(full_tables_cleanup) = 1; } + +#if ZEND_RC_DEBUG + zend_rc_debug = orig_rc_debug; +#endif } /* }}} */