com php-src: Fixed initialization of global variables in ZTS (this caused valgrind reports on few PHPT tests): ext/standard/file.c

From: Date: Thu, 12 Feb 2015 13:51:07 +0000
Subject: com php-src: Fixed initialization of global variables in ZTS (this caused valgrind reports on few PHPT tests): ext/standard/file.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84834@lists.php.net to get a copy of this message
Commit: 61a1e8d1574ae11c4432d2d34ae04191aa0a632f Author: Dmitry Stogov <dmitry@zend.com> Thu, 12 Feb 2015 16:51:07 +0300 Parents: 4d2a575db2ac28c9acede4a85152bcec342c4a1d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=61a1e8d1574ae11c4432d2d34ae04191aa0a632f Log: Fixed initialization of global variables in ZTS (this caused valgrind reports on few PHPT tests) Changed paths: M ext/standard/file.c Diff: diff --git a/ext/standard/file.c b/ext/standard/file.c index 2540c31..2d2bb27 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)

« previous php.cvs (#84834) next »