I can see where the problem is coming from:
the global that is freed is of type zval *
and allocated (eg in the ZEND_MINIT_FUNCTION) using
MAKE_STD_ZVAL...
the auto-cleanup works per request, and cleans up everything
that is allocated with emalloc... also what was intended to be global.
This
Hi!
I'm writing a php-module that uses some globals.
I use the ZEND_MINIT_FUNCTION as sort of a constructor, and call
ZEND_INIT_MODULE_GLOBALS here.
When my module ends, the ZEND_MSHUTDOWN_FUNCTION is called, but the globals
are already destroyed by then!
In ZEND_INIT_MODULE_GLOBALS, I've def