#19172 [Opn->]: limited recursive class call results segfault
| From: | derick@php.net | Date: | Thu, 29 Aug 2002 14:22:15 +0000 |
| Subject: | #19172 [Opn->]: limited recursive class call results segfault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18154@lists.php.net to get a copy of this message | ||
ID: 19172
Updated by: derick@php.net
Reported By: alberty@neptunelabs.de
-Status: Open
+Status: Won't fix
Bug Type: Reproducible crash
Operating System: i686-pc-linux-gnu
PHP Version: 4CVS-2002-08-29
New Comment:
erm,
you're initializing the variable to 0 every time you enter this
function, and the result will be that this function keeps calling
itself indefinetely.
As disucussed on the dev list before we will not fix this.
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-08-29 10:19:00] alberty@neptunelabs.de
Hi,
the follow call results a segfault:
<?php
class foo {
function out(){
static $stopper=0;
if ($stopper < 10) $this->out();
$stopper++;
}
}
$foo = new foo;
$foo->out();
?>
Tested with gcc3.1.1 and libc2.2.4
here is the backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x4044d4cc in _get_zval_ptr (node=0x816b018, Ts=0xbf8000bc,
should_free=0xbf80008c) at /usr/src/php4/Zend/zend_execute.c:71
71 {
(gdb) bt
#0 0x4044d4cc in _get_zval_ptr (node=0x816b018, Ts=0xbf8000bc,
should_free=0xbf80008c) at /usr/src/php4/Zend/zend_execute.c:71
#1 0x40445495 in zend_fetch_var_address (opline=0x816b004,
Ts=0xbf8000bc, type=1) at /usr/src/php4/Zend/zend_execute.c:529
#2 0x40447900 in execute (op_array=0x816bf34) at
/usr/src/php4/Zend/zend_execute.c:1237
#3 0x40449b55 in execute (op_array=0x816bf34) at
/usr/src/php4/Zend/zend_execute.c:1643
#4 0x40449b55 in execute (op_array=0x816bf34) at
/usr/src/php4/Zend/zend_execute.c:1643
#5 0x40449b55 in execute (op_array=0x816bf34) at
/usr/src/php4/Zend/zend_execute.c:1643
...
Regards,
Steve
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19172&edit=1