Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51295 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74160 invoked from network); 18 Jan 2011 09:46:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2011 09:46:58 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 unknown Solaris 10 (beta) Received: from [217.114.211.66] ([217.114.211.66:48874] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/34-48706-581653D4 for ; Tue, 18 Jan 2011 04:46:46 -0500 Received: from [192.168.2.189] (ppp-93-104-35-162.dynamic.mnet-online.de [93.104.35.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 03FE94BE6C; Tue, 18 Jan 2011 10:46:37 +0100 (CET) To: Antony Dovgal Cc: php-dev In-Reply-To: <4D3548B0.3060601@daylessday.org> References: <4D305A91.8020806@daylessday.org> <1295288368.3927.26.camel@guybrush> <4D3548B0.3060601@daylessday.org> Content-Type: text/plain; charset="UTF-8" Date: Tue, 18 Jan 2011 10:46:23 +0100 Message-ID: <1295343983.2244.3.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] fully enabling dl() for FPM SAPI From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Tue, 2011-01-18 at 11:00 +0300, Antony Dovgal wrote: > On 01/17/2011 09:19 PM, Johannes Schlüter wrote: > > I think it can be quite dangerous if you have extensions living shorter > > than the PHP process. Not only might dlclose() cause some leaks but > > there are a few extensions playing with function pointers or opcode > > handlers which aren't properly reset so a following request might try to > > jump to invalid memory. > > dlclose()? I can assure you I'm not going to call dlclose() on each request shutdown. > **** > Yes, that means once an extension is loaded it'll stay till the death of this particular child process). > But it does work here for the last 5 or 6 years this way and this is indeed what I want. > **** > > TBH I'm not even sure dlclose() is called at all since I wasn't able to track > this call down through all the handlers, destructors and so on in 5 min I spent on this.. module_destructor() calls it and expected it to be hit on rshutdown, else has really weird behavior - for some processes an extension would be loaded, for others not which results in non-deterministic behavior for the outside. http://lxr.php.net/opengrok/xref/PHP_5_3/Zend/zend_API.c#2120 johannes