#19172 [Csd]: limited recursive class call results segfault
| From: | derick@php.net | Date: | Thu, 29 Aug 2002 14:50:28 +0000 |
| Subject: | #19172 [Csd]: limited recursive class call results segfault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18161@lists.php.net to get a copy of this message | ||
ID: 19172
Updated by: derick@php.net
Reported By: alberty@neptunelabs.de
Status: Closed
Bug Type: Reproducible crash
Operating System: i686-pc-linux-gnu
PHP Version: 4CVS-2002-08-29
New Comment:
user errors should have the bogus state -> bogus
Previous Comments:
------------------------------------------------------------------------
[2002-08-29 10:44:16] alberty@neptunelabs.de
Okay, this was absolutly my fault.
This BR was not really intelligent.
Sorry.
------------------------------------------------------------------------
[2002-08-29 10:36:24] cynic@php.net
umm, derick, my last comment was for the OP, you were too fast. :)
------------------------------------------------------------------------
[2002-08-29 10:34:34] cynic@php.net
no, it's actually you who has not read the script. you have a bug
there.
leave this PR bogusified.
------------------------------------------------------------------------
[2002-08-29 10:33:48] derick@php.net
Of course it does, you do the next function call before you increase
$stopper.
This way $stopper will always stay 0 when it enters the function
again.
Derick
------------------------------------------------------------------------
[2002-08-29 10:31:29] alberty@neptunelabs.de
Yes, i know, but you have not read the script.
I have declared $stopper as static!
And also this script without any initializing
also crashes:
<?php
class foo {
var $stopper=0;
function out(){
if ($this->stopper < 10) $this->out();
$this->stopper++;
}
}
$foo = new foo;
$foo->out();
?>
backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x4044d45d in zend_clean_garbage () at
/usr/src/php4/Zend/zend_execute_locks.h:24
24 {
(gdb) bt
#0 0x4044d45d in zend_clean_garbage () at
/usr/src/php4/Zend/zend_execute_locks.h:24
#1 0x40446b66 in execute (op_array=0x816c314) at
/usr/src/php4/Zend/zend_execute.c:1054
#2 0x40449b55 in execute (op_array=0x816c314) at
/usr/src/php4/Zend/zend_execute.c:1643
#3 0x40449b55 in execute (op_array=0x816c314) at
/usr/src/php4/Zend/zend_execute.c:1643
Regards,
Steve
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19172
--
Edit this bug report at http://bugs.php.net/?id=19172&edit=1