#48577 [Opn->Bgs]: Exception in __destruct causes exception without a stack frame
ID: 48577
Updated by: johannes@php.net
Reported By: php at benjaminschulz dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: *
PHP Version: 5.3.0RC3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Our executor doesn't have a proper stack during shutdown. Until a
larger refactoring is made this is expected.
Previous Comments:
------------------------------------------------------------------------
[2009-06-17 07:33:27] php at benjaminschulz dot com
Description:
------------
If an exception is thrown from a __destruct in any object that has a
cyclic references this results in an Exception without a stack frame.
This makes __destruct quiet unusable because this error is hard to
debug
large applications and cyclic references are quite common in OO.
Reproduce code:
---------------
$ php -r 'class foo { public function __destruct() { throw new
Exception("bar"); }} $f = new foo; $f2 = new foo; $f->foo = $f2;
$f2->foo = $f; '
Actual result:
--------------
PHP Fatal error: Exception thrown without a stack frame in Unknown on
line 0
Fatal error: Exception thrown without a stack frame in Unknown on line
0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48577&edit=1
Thread (2 messages)