Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_objects.c

From: Date: Thu, 03 Jul 2003 00:16:01 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_objects.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1443@lists.php.net to get a copy of this message
Hello Marcus, Thursday, July 3, 2003, 1:58:47 AM, you wrote: MB> helly Wed Jul 2 19:58:47 2003 EDT MB> Modified files: MB> /ZendEngine2 zend_objects.c MB> Log: MB> Temporairy solution to overcome shutdown propbelms with objects that have MB> hidden destructors. MB> # MB> # If we set the error level to E_ERROR what we must to to be correct and an MB> # object needs to be automatically destructed in shutdown process then the MB> # exit would cause memory corruption and a SEGV. There are some ways out here: 1) have some kind of EG(shutdown) and convert the error to an E_WARNING when this happens in shutdown. [2) throw exception instead of using errors.] [3) ??] Since in a typed language calling a hidden destructor wouldn't even be possible i think the E_ERROR is the best way to go. Havin said this a shutdown solution which uses E_WARNING (only during shutdown) and maybe a better explanation would be my favorite solution. Maybe it would also be a nice idea to detect shutdown process and have a possibility to return from an error call even with E_ERROR. So the shutdown process can still use the correct severity of E_ERROR. To reproduce this simply type: php -r 'class t { function __destruct() {} } $o=new t;' Related tests tests/classes/factory_and_singleton_002.phpt tests/classes/factory_and_singleton_005.phpt tests/classes/factory_and_singleton_006.phpt Hints and ideas appreciated. Best regards, Marcus mailto:helly@php.net

« previous php.zend-engine.cvs (#1443) next »