From: phpxcache at gmail dot com
Operating system: linux
PHP version: 5.3CVS-2007-12-28 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description: op2 of OP_DATA which after INIT_NS_FCALL_BY_NAME is
uninitialized
Description:
------------
as you can see in zend_compile.c
opline->opcode = ZEND_INIT_NS_FCALL_BY_NAME;
ZEND_INIT_NS_FCALL_BY_NAME's op1 is initialized, so is op2
.........
opline->opcode = ZEND_OP_DATA;
ZEND_OP_DATA's op1 is initialized here but op2 is not
it may not cause problem in zend executor but may in opcode
optimizers/cachers
suggested fix:
Index: zend_compile.c
===================================================================
RCS file: /repository/ZendEngine2/zend_compile.c,v
retrieving revision 1.647.2.27.2.41.2.32
diff -u -r1.647.2.27.2.41.2.32 zend_compile.c
--- zend_compile.c 27 Dec 2007 13:52:05 -0000 1.647.2.27.2.41.2.32
+++ zend_compile.c 28 Dec 2007 08:56:41 -0000
@@ -1504,6 +1504,7 @@
Z_TYPE(opline->op1.u.constant) = IS_STRING;
Z_STRLEN(opline->op1.u.constant) =
Z_STRLEN(function_name->u.constant) - prefix_len;
Z_STRVAL(opline->op1.u.constant) =
zend_str_tolower_dup(Z_STRVAL(function_name->u.constant) + prefix_len,
Z_STRLEN(opline->op1.u.constant));
+ SET_UNUSED(opline->op2);
opline->extended_value =
zend_hash_func(Z_STRVAL(opline->op1.u.constant),
Z_STRLEN(opline->op1.u.constant) + 1);
} else {
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
--
Edit bug report at http://bugs.php.net/?id=43696&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43696&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43696&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43696&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43696&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43696&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43696&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43696&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43696&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43696&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43696&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43696&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43696&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43696&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43696&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43696&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43696&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43696&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43696&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43696&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43696&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43696&r=mysqlcfg