#22231 [Ver]: PHP makes Apache crash

From: Date: Sat, 15 Feb 2003 18:49:55 +0000
Subject: #22231 [Ver]: PHP makes Apache crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-33241@lists.php.net to get a copy of this message
 ID:               22231
 Updated by:       iliaa@php.net
 Reported By:      henrik.gebauer@web.de
 Status:           Verified
 Bug Type:         Class/Object related
 Operating System: Windows 2000 / Linux
 PHP Version:      4.3.0 / 4CVS-2002-02-16 / 5CVS-2002-02-16
 New Comment:

It seems to me like the user is creating a circular reference, which
should not be done. But, using the latest PHP 5.0/4.3.1 I cannot
replicate the crash.


Previous Comments:
------------------------------------------------------------------------

[2003-02-15 11:17:27] moriyoshi@php.net

This bug has something to do with the bug #21600.

http://news.php.net/article.php?group=php.dev&article=93392

------------------------------------------------------------------------

[2003-02-15 10:22:20] sniper@php.net

I can NOT reproduce this, with either of the scripts..
(It doesn't _crash_ with CLI at least)


------------------------------------------------------------------------

[2003-02-15 09:01:52] moriyoshi@php.net

Verified with HEAD / PHP_4_3 branch.

The following script causes segfault under php-4.2.3, php-4.3.0,
php-5.0.0dev.

<?php
class foo {
    var $fubar = 'fubar';
}

function &foo(){
    $GLOBALS['foo'] = &new foo();
    return $GLOBALS['foo'];
}
$foo = &foo();
var_dump($foo);
var_dump($foo->fubar);
unset($foo);
$foo = &foo();
var_dump($foo->fubar);
?>


------------------------------------------------------------------------

[2003-02-15 08:39:33] henrik.gebauer@web.de

The following script causes my Apache 2.0.43 to crash.
It is repoducable.

PHP 4.3.0 runs as an module.

<?php

class foo {
    var $test = 'test';
    function bar() 
    {
        echo $this->test;
    }
}

function &getFoo() 
{
    $GLOBALS['foo'] =& new foo();
    return $GLOBALS['foo'];
}

$foo =& getFoo();
$foo->bar();

?>

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22231&edit=1



Thread (9 messages)

« previous php.bugs (#33241) next »