From 940931aa853602b0b6edfd4ca1a6526fd7975dd2 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 13 May 2010 10:17:23 -0500 Subject: [svn-r18791] Description: Correct error in H5C_resize_entry() where protected entry sizes were not updated if the entry being resized was both pinned and protected. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode --- src/H5C.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/H5C.c b/src/H5C.c index 6d81128..6c1b18f 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -3092,18 +3092,17 @@ H5C_resize_entry(void *thing, size_t new_size) } } - /* update the pinned or protected entry list */ + /* update the pinned and/or protected entry list */ if(entry_ptr->is_pinned) { H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->pel_len), \ (cache_ptr->pel_size), \ (entry_ptr->size), (new_size)); } /* end if */ - else { - HDassert(entry_ptr->is_protected); + if(entry_ptr->is_protected) { H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->pl_len), \ (cache_ptr->pl_size), \ (entry_ptr->size), (new_size)); - } /* end else */ + } /* end if */ /* update the hash table */ H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size),\ -- cgit v0.12