From:             php at benjaminschulz dot com
Operating system: linux, osx
PHP version:      5.3CVS-2008-07-04 (CVS)
PHP Bug Type:     Reproducible crash
Bug description:  circular reference causes segfault in gc_collect_cycles()

Description:
------------
A circular reference causes gc_collect_cycles() to segfault. I know there
is another bug that looks similar (#36482) but i think this is a far better
(because simpler) test case.

Reproduce code:
---------------
<?php
class foo {
    public $foo;

    public function __destruct() {
        throw new Exception("foobar");
    }
}

$f1 = new foo;
$f2 = new foo;
$f1->foo = $f2;
$f2->foo = $f1;
unset($f1, $f2);
// triggers a segfault
gc_collect_cycles();


Actual result:
--------------
$ php test.php 
Segmentation fault

-- 
Edit bug report at http://bugs.php.net/?id=45434&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45434&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45434&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45434&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45434&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45434&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45434&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45434&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45434&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45434&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45434&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45434&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45434&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45434&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45434&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45434&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45434&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45434&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45434&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45434&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45434&r=mysqlcfg

Reply via email to