Re: fully enabling dl() for FPM SAPI
| From: | Johannes Schlüter | Date: | Tue, 18 Jan 2011 09:46:23 +0000 |
| Subject: | Re: fully enabling dl() for FPM SAPI | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51295@lists.php.net to get a copy of this message | ||
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