From: Dmitry Stogov Date: Thu, 12 Feb 2015 13:51:07 +0000 (+0300) Subject: Fixed initialization of global variables in ZTS (this caused valgrind reports on... X-Git-Tag: PRE_PHP7_EREG_MYSQL_REMOVALS~176 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61a1e8d1574ae11c4432d2d34ae04191aa0a632f;p=php Fixed initialization of global variables in ZTS (this caused valgrind reports on few PHPT tests) --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 2540c3113e..2d2bb27808 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -156,11 +156,8 @@ static ZEND_RSRC_DTOR_FUNC(file_context_dtor) static void file_globals_ctor(php_file_globals *file_globals_p) { - FG(pclose_ret) = 0; - FG(pclose_wait) = 0; - FG(user_stream_current_filename) = NULL; - FG(def_chunk_size) = PHP_SOCK_CHUNK_SIZE; - FG(wrapper_errors) = NULL; + memset(file_globals_p, 0, sizeof(php_file_globals)); + file_globals_p->def_chunk_size = PHP_SOCK_CHUNK_SIZE; } static void file_globals_dtor(php_file_globals *file_globals_p)