|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27535 Objects pointing to each other cause Apache to crash
Submitted: 2004-03-09 01:50 UTC Modified: 2004-03-11 09:57 UTC
From: random at sinfusion dot com Assigned: andi (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2004-03-09 OS: *
Private report: No CVE-ID: None
 [2004-03-09 01:50 UTC] random at sinfusion dot com
Originally this was happening at the end of PEAR::Auth's constructor when it points it's storage object's '_auth_obj' variable to itself ($this).  I've created a simpler example that still crashes either Apache 1.3.29 or 2.0.48, but in the simpler case it doesn't crash Apache until the second time you run the script.

Reproduce code:

class Class1
    var $_Class2_obj;

class Class2
    var $storage = '';

    function Class2()
        $this->storage = new Class1();

        $this->storage->_Class2_obj = $this;

$foo = new Class2();


Expected result:
No output, but no crash either.

Actual result:
Apache crashes


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-09 03:06 UTC]
It doesn't crash for me (in debug mode), but it does generate the warning:

/dat/dev/php/php-5.0dev/Zend/zend_hash.c(504) : ht=0x42be32f0 is being destroyed

This is the same problem it seems as:
 [2004-03-11 09:57 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jul 05 05:05:45 2022 UTC