ID: 29890 Updated by: [EMAIL PROTECTED] Reported By: maurice at alletha dot nl -Status: Open +Status: Verified Bug Type: Scripting Engine problem -Operating System: Windows/Linux +Operating System: * -PHP Version: Irrelevant +PHP Version: 4CVS, 5CVS (2004-12-12) New Comment:
With recent CVS checkout I got it to crash with this backtrace (same with both 4 & 5): Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1087948032 (LWP 10686)] 0x082863cc in _zval_ptr_dtor (zval_ptr=0x861f890, __zend_filename=0x84b3aa0 "/usr/src/web/php/php4/Zend/zend_execute.h", __zend_lineno=96) at /usr/src/web/php/php4/Zend/zend_execute_API.c:287 287 (*zval_ptr)->refcount--; (gdb) bt #0 0x082863cc in _zval_ptr_dtor (zval_ptr=0x861f890, __zend_filename=0x84b3aa0 "/usr/src/web/php/php4/Zend/zend_execute.h", __zend_lineno=96) at /usr/src/web/php/php4/Zend/zend_execute_API.c:287 #1 0x082a7e8e in zend_ptr_stack_clear_multiple () at zend_execute.h:96 #2 0x082a4cc1 in execute (op_array=0x8624c4c) at /usr/src/web/php/php4/Zend/zend_execute.c:1721 #3 0x08290fb9 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/web/php/php4/Zend/zend.c:900 #4 0x08258ac5 in php_execute_script (primary_file=0xbfffe110) at /usr/src/web/php/php4/main/main.c:1736 #5 0x082b69b5 in main (argc=2, argv=0xbfffe1a4) at /usr/src/web/php/php4/sapi/cli/php_cli.c:822 #6 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6 Previous Comments: ------------------------------------------------------------------------ [2004-08-30 09:10:19] maurice at alletha dot nl Description: ------------ When creating a error function which has a parameter with an reference, php will create an endless loop in calling itself (i think). The proces keeps running and will not stop. You can blog up a windows machine running under iis/cgi because it doesn't react on set_time_limit(). I've seen this problem in php 4.x and 5.x under windows and in linux on a dual system. Linux with a single cpu seemed not to have this problem (?) (I'm using an additional parameter to my error function because of custom calling of the function) Reproduce code: --------------- <? function customErrorHandler($fErrNo,$fErrStr,$fErrFile,$fErrLine,&$fClass) { echo "error :".$fErrStr; } set_time_limit(5); error_reporting(E_ALL); set_error_handler("customErrorHandler"); define("TEST",2); //should return a notice that the constant is already defined define("TEST",3); ?> Expected result: ---------------- There should be a notice about the redefined "TEST" define Actual result: -------------- An endless loop. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29890&edit=1