Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7150 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90056 invoked by uid 1010); 17 Jan 2004 14:28:35 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 90022 invoked by uid 1007); 17 Jan 2004 14:28:34 -0000 Message-ID: <20040117142834.89981.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: mep_eisen@web.de Date: Sat, 17 Jan 2004 15:28:01 +0100 References: <200401090011.44840.ilia@prohost.org> <20040109120318.6b6d1cdb.paj@pearfr.org> Lines: 36 User-Agent: KNode/0.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Posted-By: 80.139.45.212 Subject: Re: [PHP-DEV] ZE2, dl() and objects From: mep_eisen@web.de (Martin Eisengardt) Pierre-Alain Joye wrote: >> It seems there is a problem in either the PHP's shutdown sequence in >> php_request_shutdown() or destrutor order in ZE2. The problem is quite >> simple, I did some debugging and got a segfault in zend_variables.c:61 ZEND_OBJ_HT_P(zvalue)->del_ref(zavlue TSRMLS_CC); seems that the class definitions an extension defines are lost (the extension is unloaded) before the created variables are destroyed. object_handlers table is destroyed. If you set your object to null inside php script or if you destroy all public variables inside module shutdown sequence it works fine... $a=null; works fine. code block from php_request_shutdown() (main.c:1216) if (PG(modules_activated)) { zend_deactivate_modules(TSRMLS_C); // modules are unloaded } [...] zend_deactivate(TSRMLS_C); // variables are destroyed inside here If you change the order it works and there are no segfaults. but there are some other problems php reports: /home/mepeisen/projects/php/php-5.0.0b3/Zend/zend_hash.c(672) : ht=0x8230ef8 is already destroyed /home/mepeisen/projects/php/php-5.0.0b3/Zend/zend_hash.c(672) : ht=0x8230ef8 is already destroyed /home/mepeisen/projects/php/php-5.0.0b3/Zend/zend_hash.c(67) : Bailed out without a bailout address!