Re: ZE2, dl() and objects
| From: | Martin Eisengardt | Date: | Sat, 17 Jan 2004 14:28:01 +0000 |
| Subject: | Re: ZE2, dl() and objects | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7150@lists.php.net to get a copy of this message | ||
Pierre-Alain Joye wrote:
>> It seems there is a problem in either the PHP's shutdown sequence in
>> php_request_shutdown() or destrutor order in ZE2. The problem is quite
>> simple,
I did some debugging and got a segfault in zend_variables.c:61
ZEND_OBJ_HT_P(zvalue)->del_ref(zavlue TSRMLS_CC);
seems that the class definitions an extension defines are lost (the
extension is unloaded) before the created variables are destroyed.
object_handlers table is destroyed. If you set your object
to null inside php script or if you destroy all public variables
inside module shutdown sequence it works fine...
$a=null;
works fine.
code block from php_request_shutdown() (main.c:1216)
if (PG(modules_activated)) {
zend_deactivate_modules(TSRMLS_C); // modules are unloaded
}
[...]
zend_deactivate(TSRMLS_C); // variables are destroyed inside here
If you change the order it works and there are no segfaults. but there are
some other problems php reports:
/home/mepeisen/projects/php/php-5.0.0b3/Zend/zend_hash.c(672) : ht=0x8230ef8
is already destroyed
/home/mepeisen/projects/php/php-5.0.0b3/Zend/zend_hash.c(672) : ht=0x8230ef8
is already destroyed
/home/mepeisen/projects/php/php-5.0.0b3/Zend/zend_hash.c(67) : Bailed out
without a bailout address!