Re: Memory manager fast_cache_list_entry corruption

From: Date: Sat, 06 Jan 2001 04:04:51 +0000
Subject: Re: Memory manager fast_cache_list_entry corruption
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-43106@lists.php.net to get a copy of this message
The problem is most likely not in the memory manager, but in a piece of code that uses it. Perhaps the same element is freed twice for some reason (bug). Did you try building a debug build? Didn't you happen to see warnings about freeing an already-freed element? Zeev At 18:24 5/1/2001, Bill Stoddard wrote:
Running PHP as a servlet under Tomcat on AIX and I am getting a consistent segfault on the third call to jver.php. I've debugged to the point of identifying a corrupted fast_cache_list_entry. Specifically, while iterating through the while loop in shutdown_memory_manager (see below), I hit a fast_cache_list_entry whose next pointer points back to itself. efree is called multiple times on the same address which eventually results in a seg fault. Hoping someone more familier with the code may have some insite on where I might look for the bug. Thanks, Bill From zend_alloc.c... ZEND_API void shutdown_memory_manager(int silent, int clean_cache) { <snip>
    for (fci=0; fci<MAX_FAST_CACHE_TYPES; fci++) {
        fast_cache_list_entry = AG(fast_cache_list_head)[fci];
        while (fast_cache_list_entry) {
            next_fast_cache_list_entry = fast_cache_list_entry->next;
            efree(fast_cache_list_entry);
            fast_cache_list_entry = next_fast_cache_list_entry;
    }
} -- 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
-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/

« previous php.dev (#43106) next »