Re: Re: restore user opcode handler in PHP
| From: | yoram bar haim | Date: | Mon, 13 Feb 2012 09:23:11 +0000 |
| Subject: | Re: Re: restore user opcode handler in PHP | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57821@lists.php.net to get a copy of this message | ||
Hi Stas
reproduction is indeed easy - just change a static variable (e.q. call
zend_set_user_opcode_handler()), then send SIGHUP to apache parent process and
check the value in zend_user_opcode_handlers or zend_user_opcodes.
it is possible that this problem is related to specific gcc versions but the
bottom line is that static initializers occur at first dlpopen but don't re-
occur after dlclose()+dlopen().
on linux it behaves ok, unless you have refrence count bug or RTLD_NODELETE
on your link flags. however, I also saw this happens on linux once, probably
because of glibc bug in specific version.
let me return with more detailes about mac.
On Monday, February 13, 2012 11:02:20 AM Stas Malyshev wrote:
> Hi!
>
> > Hi Dmitry.
> > the patch does work, in sense of actually restoring the handlers state
> > when you call zend_set_user_opcode_handler() with original handler.
> > the patch does not solve the basic problem of no re-initialization of
> > static arrayes on mac.
>
> Could you please describe in more details what's going on on mac? It
> seems strange that dlopen() would not initialize vars - that'd be pretty
> bad behavior. Do you have an easy way to reproduce it?