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?

Reply via email to