com php-src: On Windows PHP may be restarted with different set of DSO extensions without SHM reset. This may make optimisation for entities from DSO
extensions inconsistent.: ext/opcache/Optimizer/pass1_ 5.c
| From: | Dmitry Stogov | Date: | Mon, 29 Jun 2015 14:45:56 +0000 |
| Subject: | com php-src: On Windows PHP may be restarted with different set of DSO extensions without SHM reset. This may make optimisation for entities from DSO extensions inconsistent.: ext/opcache/Optimizer/pass1_ 5.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87626@lists.php.net to get a copy of this message | ||
Commit: ee1e67fae6f649894721a5293ad9ab290add121f
Author: Dmitry Stogov <dmitry@zend.com> Mon, 29 Jun 2015 17:45:56 +0300
Parents: 2e85e6d3eec94b9500ae07dfe896de379558e883
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ee1e67fae6f649894721a5293ad9ab290add121f
Log:
On Windows PHP may be restarted with different set of DSO extensions without SHM reset.
This may make optimisation for entities from DSO extensions inconsistent.
Changed paths:
M ext/opcache/Optimizer/pass1_5.c
Diff:
diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c
index f409192..4ed3dd4 100644
--- a/ext/opcache/Optimizer/pass1_5.c
+++ b/ext/opcache/Optimizer/pass1_5.c
@@ -376,9 +376,13 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
Z_STRVAL(ZEND_OP1_LITERAL(opline - 1)), Z_STRLEN(ZEND_OP1_LITERAL(opline - 1)));
if (zend_hash_find(EG(function_table), lc_name, Z_STRLEN(ZEND_OP1_LITERAL(opline - 1)) + 1,
- (void *)&func) == SUCCESS &&
- func->type == ZEND_INTERNAL_FUNCTION &&
- func->module->type == MODULE_PERSISTENT) {
+ (void *)&func) == SUCCESS
+ && func->type == ZEND_INTERNAL_FUNCTION
+ && func->module->type == MODULE_PERSISTENT
+#ifdef ZEND_WIN32
+ && func->module->handle == NULL
+#endif
+ ) {
zval t;
if (Z_STRLEN(ZEND_OP1_LITERAL(opline)) == sizeof("is_callable") - 1 ||
func->handler != ZEND_FN(display_disabled_function)) {
@@ -412,7 +416,11 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
ZVAL_BOOL(&t, 0);
}
} else {
- if (m->type == MODULE_PERSISTENT) {
+ if (m->type == MODULE_PERSISTENT
+#ifdef ZEND_WIN32
+ && m->handle == NULL
+#endif
+ ) {
ZVAL_BOOL(&t, 1);
} else {
break;