com php-src: initialize EG(windows_version_info): Z end/zend.c
| From: | Anatol Belski | Date: | Sat, 04 Apr 2015 18:28:58 +0000 |
| Subject: | com php-src: initialize EG(windows_version_info): Z end/zend.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86074@lists.php.net to get a copy of this message | ||
Commit: f51a9c71dd011f7d6879b326280adc05ae45f7f7
Author: Anatol Belski <ab@php.net> Sat, 4 Apr 2015 20:28:58 +0200
Parents: 30d59aed1c5a27435149c0609ad8a66802df117d
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f51a9c71dd011f7d6879b326280adc05ae45f7f7
Log:
initialize EG(windows_version_info)
there are more places refering to this, but seems it was never
initialized
Changed paths:
M Zend/zend.c
Diff:
diff --git a/Zend/zend..c b/Zend/zend.c
index 77f7196..77be1cd 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -516,6 +516,13 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /*
{{
executor_globals->exception_class = NULL;
executor_globals->exception = NULL;
executor_globals->objects_store.object_buckets = NULL;
+#ifdef ZEND_WIN32
+ ZeroMemory(&executor_globals->windows_version_info, sizeof(OSVERSIONINFOEX));
+ executor_globals->windows_version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+ if (!GetVersionEx((OSVERSIONINFO *) &executor_globals->windows_version_info)) {
+ ZEND_ASSERT(0); /* Should not happen as sizeof is used. */
+ }
+#endif
}
/* }}} */