From 3e35def20bda5df72b1d8a45c0b8c53b754d5fa7 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 2 Nov 2017 23:52:50 +0300 Subject: [PATCH] Start RC_DEBUG at the end of MINIT and finish in MSHUTDOWN after all worker threads are terminated. --- main/main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main/main.c b/main/main.c index 7b43e2e0f0d..0b86eca2050 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