ID: 18540
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Closed
Bug Type: Zend Engine 2 problem
Operating System: Windows
PHP Version: 4.3.0-DEV with Zend2
New Comment:
This functionality is now built directly into ZE2.
Previous Comments:
------------------------------------------------------------------------
[2002-08-07 13:33:19] [EMAIL PROTECTED]
Seeing the same thing on Darwin 5.5/OSX 10.1.5 with the latest CVS code
(well, latest as of this morning, 8/7/2002). trying to run the code
from the README file in /ext/overload with the php CLI executable, i
get a bus error. this is what i see in gdb, after running configure
with --enable-debug added:
Starting program: /usr/local/book/php/bin/php mydb.php
[Switching to thread 1 (process 13527 thread 0x1603)]
Reading symbols for shared libraries . done
Program received signal EXC_BAD_ACCESS, Could not access memory.
0x000ea8ec in zend_hash_exists (ht=0x4dae34, arKey=0x1151dc "__get",
nKeyLength=6) at /usr/local/book/php4/Zend/zend_hash.c:930
930 p = ht->arBuckets[nIndex];
(gdb) bt
#0 0x000ea8ec in zend_hash_exists (ht=0x4dae34, arKey=0x1151dc
"__get", nKeyLength=6) at /usr/local/book/php4/Zend/zend_hash.c:930
#1 0x0002ecd8 in zif_overload (ht=0, return_value=0x4fa310,
this_ptr=0x6, return_value_used=0) at
/usr/local/book/php4/ext/overload/overload.c:671
#2 0x000fb95c in execute (op_array=0x4f5da8) at
/usr/local/book/php4/Zend/zend_execute.c:2079
#3 0x000e411c in zend_execute_scripts (type=0, retval=0x0,
file_count=3) at /usr/local/book/php4/Zend/zend.c:827
#4 0x000b7e54 in php_execute_script (primary_file=0xbffff6c8) at
/usr/local/book/php4/main/main.c:1398
#5 0x00103078 in main (argc=2, argv=0xbffffafc) at
/usr/local/book/php4/sapi/cli/php_cli.c:675
#6 0x000024b4 in _start ()
#7 0x000022e4 in start ()
------------------------------------------------------------------------
[2002-07-25 10:55:43] [EMAIL PROTECTED]
-
------------------------------------------------------------------------
[2002-07-24 11:11:01] [EMAIL PROTECTED]
The overload extension is enabled by default on PHP-4.3.0-Dev with
Zend2 alpha 1 AND 2 on windows, but the overload() function does not
work. At times it crashes Apache, other times it gives a message like
'too many nested levels'.
class test {}
overload('test'); // <== Crashes PHP
I guess it happens because of the new way PHP handles objects - we no
longer need to call $this->function(), so how would the overloaded
class decide wich function or property to work with?
Also, when overloading methods only the first function call is
overloaded. When an overloaded function is called from within another
one, it is not found. I think this behavior is fine for properties, but
it limits the use of the extension when using overloaded methods.
(should this be in another bug report or feature wish list?)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18540&edit=1