Memory manager fast_cache_list_entry corruption
| From: | Bill Stoddard | Date: | Fri, 05 Jan 2001 16:24:20 +0000 |
| Subject: | Memory manager fast_cache_list_entry corruption | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-43052@lists.php.net to get a copy of this message | ||
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;
}
}