Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23858 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97445 invoked by uid 1010); 1 Jun 2006 17:38:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 97430 invoked from network); 1 Jun 2006 17:38:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2006 17:38:38 -0000 X-PHP-List-Original-Sender: steph@zend.com X-Host-Fingerprint: 192.38.9.232 gw2.emini.dk Linux 2.4/2.6 Received: from ([192.38.9.232:17113] helo=gw2.emini.dk) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C7/20-22639-E162F744 for ; Thu, 01 Jun 2006 13:38:38 -0400 Received: from foxbox (IGLD-84-228-79-24.inter.net.il [84.228.79.24]) by gw2.emini.dk (Postfix) with ESMTP id 27505B4946; Thu, 1 Jun 2006 19:38:33 +0200 (CEST) Message-ID: <0b1e01c685a1$e2aa7a90$6602a8c0@foxbox> Reply-To: "Steph Fox" To: "Frank M. Kromann" Cc: "'internals'" , "Antony Dovgal" , "Dmitry Stogov" , "'Xuefer'" , "Andi Gutmans" References: <11491391532760000@9866357972520000.9866341568840000> Date: Thu, 1 Jun 2006 19:36:14 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] tsrm_shutdown() and the CLI SAPI From: steph@zend.com ("Steph Fox") >> ts_free_id() would be a correct workaround if it came from > zend_shutdown(). >> How's it right to suddenly force EVERY extension author to add it to > their >> code individually? > > This was only reqiured in extensions registering custom dtor's like tidy > and printer. > Unfortunately that's not true. It's also required in the php-gtk module even though we don't declare a dtor - the DL_UNLOAD call is the first thing in the shutdown process, and if you _don't_ have free_ts_id() in MSHUTDOWN at present you'll be freeing the resource after the module's unloaded. DL_UNLOAD is called on anything loaded via dl() or the php.ini.... This isn't our only problem though - the GLOBAL_CLASS_TABLE is being destroyed during CG dtor because it doesn't match the current CG->global_class_table. Because the CG dtor is run after the PHP-GTK module is unloaded, destroying that class table crashes the shutdown process. I've no idea why or how GTK classes end up in the CG global class table, but I guess that's what happening here. Any offers? - Steph