From: Dmitry Stogov Date: Thu, 2 Nov 2017 20:52:50 +0000 (+0300) Subject: Start RC_DEBUG at the end of MINIT and finish in MSHUTDOWN after all worker threads... X-Git-Tag: php-7.3.0alpha1~1097 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e35def20bda5df72b1d8a45c0b8c53b754d5fa7;p=php Start RC_DEBUG at the end of MINIT and finish in MSHUTDOWN after all worker threads are terminated. --- diff --git a/main/main.c b/main/main.c index 7b43e2e0f0..0b86eca205 100644 --- a/main/main.c +++ b/main/main.c @@ -1596,10 +1596,6 @@ int php_request_startup(void) { int retval = SUCCESS; -#if ZEND_RC_DEBUG - zend_rc_debug = 1; -#endif - zend_interned_strings_activate(); #ifdef HAVE_DTRACE @@ -1809,10 +1805,6 @@ void php_request_shutdown(void *dummy) #ifdef HAVE_DTRACE DTRACE_REQUEST_SHUTDOWN(SAFE_FILENAME(SG(request_info).path_translated), SAFE_FILENAME(SG(request_info).request_uri), (char *)SAFE_FILENAME(SG(request_info).request_method)); #endif /* HAVE_DTRACE */ - -#if ZEND_RC_DEBUG - zend_rc_debug = 0; -#endif } /* }}} */ @@ -2282,6 +2274,10 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod zend_interned_strings_switch_storage(1); +#if ZEND_RC_DEBUG + zend_rc_debug = 1; +#endif + /* we're done */ return retval; } @@ -2319,6 +2315,10 @@ void php_module_shutdown(void) ts_free_worker_threads(); #endif +#if ZEND_RC_DEBUG + zend_rc_debug = 0; +#endif + #ifdef PHP_WIN32 (void)php_win32_shutdown_random_bytes(); #endif