#48577 [Opn->Bgs]: Exception in __destruct causes exception without a stack frame

From: Date: Thu, 18 Jun 2009 14:17:26 +0000
Subject: #48577 [Opn->Bgs]: Exception in __destruct causes exception without a stack frame
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-138461@lists.php.net to get a copy of this message
 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)

« previous php.bugs (#138461) next »