Re: Re: Bug 5474 [FIX: change to zend engine included]

From: Date: Thu, 04 Jan 2001 06:25:36 +0000
Subject: Re: Re: Bug 5474 [FIX: change to zend engine included]
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-42905@lists.php.net to get a copy of this message
Nice catch. I guess the change made to the list_entry_destructor() function wasn't done in the plist version. I just commited the patch. Thanks, Andi At 09:43 PM 1/3/2001 -0800, Steven Roussey wrote:
Hi! I wanted to find a fix before I sent off the bug report, but I messed up. I found a fix. Destructors for all persistent objects belonging to any extension were never called. This routine needs to be replaced in Zend/zend_list.c: void plist_entry_destructor(void *ptr) {
        zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
        zend_rsrc_list_dtors_entry *ld;
        if (zend_hash_index_find(&list_destructors, le->type,(void **)
&ld)==SUCCESS) {
                switch (ld->type) {
                        case ZEND_RESOURCE_LIST_TYPE_STD:
                                if (ld->plist_dtor) {
                                        (ld->plist_dtor)(le->ptr);
                                }
                                break;
                        case ZEND_RESOURCE_LIST_TYPE_EX:
                                if (ld->plist_dtor_ex) {
                                        ld->plist_dtor_ex(le);
                                }
                                break;
                        EMPTY_SWITCH_DEFAULT_CASE()
                }
        } else {
                zend_error(E_WARNING,"Unknown persistent list entry type in
module shutdown (%d)",le->type);
        }
} That should do it. Should help MySQL, pgsql, mssql, and others. Will run previously untested code, so additional debugging of other code is advised. Sincerely, Steven Roussey Network54.com http://network54.com/?pp=e -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.dev (#42905) next »