#45434 [Opn]: circular reference causes segfault in gc_collect_cycles()

From: Date: Fri, 04 Jul 2008 20:25:34 +0000
Subject: #45434 [Opn]: circular reference causes segfault in gc_collect_cycles()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-126285@lists.php.net to get a copy of this message
ID: 45434 User updated by: php at benjaminschulz dot com Reported By: php at benjaminschulz dot com Status: Open Bug Type: Reproducible crash Operating System: linux, osx PHP Version: 5.3CVS-2008-07-04 (CVS) New Comment: Oops, i missed one important point: the segfault occurs if an exception is thrown ;) Sorry, it's too late for me today. Previous Comments: ------------------------------------------------------------------------ [2008-07-04 20:14:21] php at benjaminschulz dot com 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 this bug report at http://bugs.php.net/?id=45434&edit=1

« previous php.bugs (#126285) next »