com php-src: Use different method to suppress "false" memory leak reports: ext/opcache/ZendAccelerator.c
| From: | Dmitry Stogov | Date: | Fri, 22 Feb 2019 07:11:43 +0000 |
| Subject: | com php-src: Use different method to suppress "false" memory leak reports: ext/opcache/ZendAccelerator.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104820@lists.php.net to get a copy of this message | ||
Commit: 22691f9ef7491de61d31783cffaf6d325c48b63e
Author: Dmitry Stogov <dmitry@zend.com> Fri, 22 Feb 2019 10:11:43 +0300
Parents: 4d3415636d4e68144c08ce77f0430c4702782c55
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=22691f9ef7491de61d31783cffaf6d325c48b63e
Log:
Use different method to suppress "false" memory leak reports
Changed paths:
M ext/opcache/ZendAccelerator.c
Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index f5fa1d9..48a5992 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -4129,9 +4129,6 @@ static int accel_finish_startup(void)
zend_bool old_reset_signals = SIGG(reset);
#endif
- /* Cleanup heap, to avoid memory leak reports */
- shutdown_memory_manager(1, 0);
-
if (UNEXPECTED(file_cache_only)) {
zend_accel_error(ACCEL_LOG_WARNING, "Preloading doesn't work in
\"file_cache_only\" mode");
return SUCCESS;
@@ -4171,6 +4168,7 @@ static int accel_finish_startup(void)
EG(error_reporting) = orig_error_reporting;
if (rc == SUCCESS) {
+ zend_bool orig_report_memleaks;
/* don't send headers */
SG(headers_sent) = 1;
@@ -4192,7 +4190,10 @@ static int accel_finish_startup(void)
ret = FAILURE;
}
+ orig_report_memleaks = PG(report_memleaks);
+ PG(report_memleaks) = 0;
php_request_shutdown(NULL);
+ PG(report_memleaks) = orig_report_memleaks;
} else {
ret = FAILURE;
}