Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51292 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54205 invoked from network); 18 Jan 2011 08:00:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2011 08:00:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=tony@daylessday.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tony@daylessday.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daylessday.org designates 89.208.40.236 as permitted sender) X-PHP-List-Original-Sender: tony@daylessday.org X-Host-Fingerprint: 89.208.40.236 mail.daylessday.org Linux 2.6 Received: from [89.208.40.236] ([89.208.40.236:52974] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/D0-48706-9A8453D4 for ; Tue, 18 Jan 2011 03:00:43 -0500 Received: from think.site (unknown [91.79.216.170]) by daylessday.org (Postfix) with ESMTPSA id 09015BFA09D; Tue, 18 Jan 2011 11:00:39 +0300 (MSK) Message-ID: <4D3548B0.3060601@daylessday.org> Date: Tue, 18 Jan 2011 11:00:48 +0300 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 MIME-Version: 1.0 To: =?UTF-8?B?Sm9oYW5uZXMgU2NobMO8dGVy?= CC: php-dev References: <4D305A91.8020806@daylessday.org> <1295288368.3927.26.camel@guybrush> In-Reply-To: <1295288368.3927.26.camel@guybrush> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] fully enabling dl() for FPM SAPI From: tony@daylessday.org (Antony Dovgal) 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.. > Additionally there's no restriction on this once safe_mode is gone, so > anybody could load any C extension - while that can be fixed by > advertising disable_function=dl That's right, disabling it is not a problem. -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP