Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23820 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39699 invoked by uid 1010); 31 May 2006 10:40:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39684 invoked from network); 31 May 2006 10:40:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2006 10:40:28 -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:4720] helo=gw2.emini.dk) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 9F/3A-07504-9927D744 for ; Wed, 31 May 2006 06:40:26 -0400 Received: from foxbox (IGLD-84-228-79-24.inter.net.il [84.228.79.24]) by gw2.emini.dk (Postfix) with ESMTP id B0ADDB4028; Wed, 31 May 2006 12:40:20 +0200 (CEST) Message-ID: <07f701c6849e$4d986510$6602a8c0@foxbox> Reply-To: "Steph Fox" To: "Xuefer" , "Andi Gutmans" , "Dmitry Stogov" Cc: "internals" References: <11b601c681bd$c1fc3050$6602a8c0@foxbox><28139bc0605271958m30a23a60kfc1bae145643fca4@mail.gmail.com><126f01c68203$691f9cb0$6602a8c0@foxbox> <7.0.1.0.2.20060530212314.038819c8@zend.com> <075e01c68483$cb7c9700$6602a8c0@foxbox> Date: Wed, 31 May 2006 12:38:04 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=response 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") C:\sandbox\php5\Zend>grep -l -drecurse "HAVE_LIBDL" *.* ChangeLog zend.h Zend.m4 zend_API.c zend_config.nw.h zend_config.w32.h Zend assumes Windows builds don't have HAVE_LIBDL defined. PHP - which only uses it in dl.c - assumes they do, and sets it during win32 config. ZEND_MODULE_DTOR - used in the module_registry hash - is defined as module_destructor(), which lives in zend_API.c and contains the following block. #if HAVE_LIBDL || defined(HAVE_MACH_O_DYLD_H) #if !(defined(NETWARE) && defined(APACHE_1_BUILD)) if (module->handle) { DL_UNLOAD(module->handle); } #endif #endif So PHP-GTK's 'crime' is that it includes zend_API.h. Nice, eh? A better fix for Dmitry's initial win32 memory-setting issue would be to kill the HAVE_LIBDL line in config.w32.h.in (or replace it with #undef) and alter dl.c to deal with PHP_WIN32 directly. Dmitry, if you want to go through Zend's codebase and check the side-effects of every single setting in config.w32.h.in that wasn't in zend_config.w32.h before March 14th, that's groovy. But be warned, it takes a long time to test them...! - Steph ----- Original Message ----- From: "Steph Fox" To: "Xuefer" ; "Andi Gutmans" Cc: "internals" Sent: Wednesday, May 31, 2006 9:28 AM Subject: Re: [PHP-DEV] tsrm_shutdown() and the CLI SAPI > Fixing the config so that ZE doesn't think it's PHP might actually make > Zend more stable too... > > I think I _know_ why other extension people are seeing a crash on > ts_free_id(), but my biggest priority at present is getting the PHP-GTK > crash out of the way. > > - Steph > >> Without looking to deeply into this reincarnation my guess would be that >> for CLI, Zeev's approach makes good sense. >> >> Andi >> >> At 08:04 PM 5/27/2006, Steph Fox wrote: >>>Thanks Xuefer... >>> >>>This bug's been extant for a long time, and I only found out why when I >>>spent two days/nights trying to track down its history and mechanics. >>> >>>It's a pig. >>> >>>- Steph >>> >>>----- Original Message ----- From: "Xuefer" >>>To: "Steph Fox" >>>Cc: "internals" >>>Sent: Sunday, May 28, 2006 4:58 AM >>>Subject: Re: [PHP-DEV] tsrm_shutdown() and the CLI SAPI >>> >>> >>>>i can confirm this on other extension. >>>>something like this >>>>grep free_id */*.c -B1 -A3 >>>>mbstring/mbstring.c-#ifdef ZTS >>>>mbstring/mbstring.c: ts_free_id(mbstring_globals_id); >>>>mbstring/mbstring.c-#else >>>>mbstring/mbstring.c- _php_mb_globals_dtor(&mbstring_globals >>>>TSRMLS_CC); >>>>mbstring/mbstring.c-#endif >>>>have no problem with it >>>>while some modules like >>>>$ grep 'ndef ZTS' */*.c -A2 >>>>apc/php_apc.c:#ifndef ZTS >>>>apc/php_apc.c- php_apc_shutdown_globals(&apc_globals); >>>>apc/php_apc.c-#endif >>>>- >>>>eaccelerator/eaccelerator.c:#ifndef ZTS >>>>eaccelerator/eaccelerator.c- >>>>eaccelerator_globals_dtor(&eaccelerator_globals TSRMLS_CC); >>>>eaccelerator/eaccelerator.c-#endif >>>>when compiled as shared module, will crash >>>>eaccelerator(mmcache) workaround it by disabling the dtor. >>>>/*??? FIXME >>>> ZEND_INIT_MODULE_GLOBALS(eaccelerator, eaccelerator_init_globals, >>>>eaccelerator_globals_dtor); >>>>*/ >>>> ZEND_INIT_MODULE_GLOBALS(eaccelerator, eaccelerator_init_globals, >>>> NULL); >>> >>>-- >>>PHP Internals - PHP Runtime Development Mailing List >>>To unsubscribe, visit: http://www.php.net/unsub.php >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> __________ NOD32 1.1380 (20060125) Information __________ >> >> This message was checked by NOD32 antivirus system. >> http://www.eset.com >> >> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > > __________ NOD32 1.1380 (20060125) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > >