Patch pass1_5-extension_loaded.diff for opcache Bug #66334
Patch version 2013-12-21 16:02 UTC
Return to Bug #66334 |
Download this patch
Patch Revisions:
Developer: Terry@ellisons.org.uk
diff --git a/pass1_5.c.orig b/pass1_5.c
index f173c3f..04e283b 100644
--- a/pass1_5.c
+++ b/pass1_5.c
@@ -383,9 +383,11 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
zend_module_entry *m;
char *lc_name = zend_str_tolower_dup(
Z_STRVAL(ZEND_OP1_LITERAL(opline - 1)), Z_STRLEN(ZEND_OP1_LITERAL(opline - 1)));
+ int found = (zend_hash_find(&module_registry,
+ lc_name, Z_STRLEN(ZEND_OP1_LITERAL(opline - 1)) + 1, (void *)&m) == FAILURE);
+ efree(lc_name);
- if (zend_hash_find(&module_registry,
- lc_name, Z_STRLEN(ZEND_OP1_LITERAL(opline - 1)) + 1, (void *)&m) == FAILURE) {
+ if (found) {
if (!PG(enable_dl)) {
break;
} else {
@@ -405,7 +407,6 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
literal_dtor(&ZEND_OP1_LITERAL(opline));
MAKE_NOP(opline);
}
- efree(lc_name);
} else if (Z_STRLEN(ZEND_OP1_LITERAL(opline)) == sizeof("defined")-1 &&
!memcmp(Z_STRVAL(ZEND_OP1_LITERAL(opline)),
"defined", sizeof("defined")-1)) {
|