Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12809 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42419 invoked by uid 1010); 14 Sep 2004 17:31:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 38773 invoked from network); 14 Sep 2004 17:29:55 -0000 Received: from unknown (HELO mail.zend.com) (80.74.107.235) by pb1.pair.com with SMTP; 14 Sep 2004 17:29:55 -0000 Received: (qmail 16254 invoked from network); 14 Sep 2004 17:29:52 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 14 Sep 2004 17:29:52 -0000 Message-ID: <5.1.0.14.2.20040914102942.035a72c0@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 14 Sep 2004 10:29:46 -0700 To: Stanislav Malyshev ,Antony Dovgal Cc: php-dev In-Reply-To: References: <20040910095725.257bcb8e.tony2001@phpclub.net> <20040910095725.257bcb8e.tony2001@phpclub.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] [patch] Zend/zend_objects_API.c - bug #29980 (segfault while executing __destruct()) From: andi@zend.com (Andi Gutmans) Yes I agree. At 02:02 PM 9/13/2004 +0300, Stanislav Malyshev wrote: >AD>>ATM ZE2 calls destructor at the end of the request and no matter is >AD>>there were a fatal error (which should probably stop executing the >AD>>script). In some cases it leads to nasty segfaults (me and report's >AD>>author can reproduce it, but others can't. weird..). > >Well, the cause of the faults is as follows: >If we are in shutdown, and one of the destructors fails with fatal error, >then other destructors for other objects are not called. Thus, their >if they hold some objects, destructors for these objects will not be >called. Later, when the storage is cleaned with >zend_objects_store_free_object_storage(), engine will attempt to call >dtors for objects that didn't have their dtors called before. However, on >that stage engine is already unable to run PHP code (function and class >tables are already cleaned, etc.) - so it crashes. > >What I would propose is to inhibit calling destructors after >shutdown_destructors() was finished. > >-- >Stanislav Malyshev, Zend Products Engineer >stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115 > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php