ID: 36006
Updated by: [EMAIL PROTECTED]
Reported By: php_nospam at ramihyn dot sytes dot net
-Status: Open
+Status: Assigned
Bug Type: Scripting Engine problem
Operating System: Windows, Debian Sarge
PHP Version: 5.1.2
-Assigned To:
+Assigned To: dmitry
New Comment:
Dmitry, please check it out.
Looks like a chicken-and-egg problem to me.
Previous Comments:
------------------------------------------------------------------------
[2006-01-14 01:13:32] php_nospam at ramihyn dot sytes dot net
Description:
------------
segfault caused by setting properties to null in __destruct()
Reproduce code:
---------------
<?php
class Person {
public $dad;
public function __destruct() {
$this->dad = null; /* no segfault if this is commented out */
}
}
class Dad extends Person {
public $son;
public function __construct() {
$this->son = new Person;
$this->son->dad = $this; /* no segfault if this is commented
out */
}
public function __destruct() {
$this->son = null;
parent::__destruct(); /* segfault here */
}
}
$o = new Dad;
unset($o);
?>
Expected result:
----------------
No segfault
Actual result:
--------------
PHP crashes due to a segfault (crashes apache worker thread when
running as apache module)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36006&edit=1