File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2953,8 +2953,17 @@ static void clean_module_classes(int module_number) /* {{{ */
29532953
29542954void module_destructor (zend_module_entry * module ) /* {{{ */
29552955{
2956+ #if ZEND_RC_DEBUG
2957+ bool orig_rc_debug = zend_rc_debug ;
2958+ #endif
29562959
29572960 if (module -> type == MODULE_TEMPORARY ) {
2961+ #if ZEND_RC_DEBUG
2962+ /* FIXME: Loading extensions during the request breaks some invariants.
2963+ * In particular, it will create persistent interned strings, which is
2964+ * not allowed at this stage. */
2965+ zend_rc_debug = false;
2966+ #endif
29582967 zend_clean_module_rsrc_dtors (module -> module_number );
29592968 clean_module_constants (module -> module_number );
29602969 clean_module_classes (module -> module_number );
@@ -2996,6 +3005,10 @@ void module_destructor(zend_module_entry *module) /* {{{ */
29963005 DL_UNLOAD (module -> handle );
29973006 }
29983007#endif
3008+
3009+ #if ZEND_RC_DEBUG
3010+ zend_rc_debug = orig_rc_debug ;
3011+ #endif
29993012}
30003013/* }}} */
30013014
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ PHPAPI PHP_FUNCTION(dl)
6060
6161#if ZEND_RC_DEBUG
6262 bool orig_rc_debug = zend_rc_debug ;
63+ /* FIXME: Loading extensions during the request breaks some invariants. In
64+ * particular, it will create persistent interned strings, which is not
65+ * allowed at this stage. */
6366 zend_rc_debug = false;
6467#endif
6568
You can’t perform that action at this time.
0 commit comments