summaryrefslogtreecommitdiffstats
path: root/src/H5Gint.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-11-20 16:57:46 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-11-20 16:57:46 (GMT)
commit4e7b19f8260a7adb0e3b3df30e2d8289fccdcca6 (patch)
treea8527d110745f16d07ef1fd8a29e8eea84ed57e5 /src/H5Gint.c
parente10c0e7894699a4113074cd3e9212bafe56a5b40 (diff)
downloadhdf5-4e7b19f8260a7adb0e3b3df30e2d8289fccdcca6.zip
hdf5-4e7b19f8260a7adb0e3b3df30e2d8289fccdcca6.tar.gz
hdf5-4e7b19f8260a7adb0e3b3df30e2d8289fccdcca6.tar.bz2
Two minor cache changes:
* Evict-on-close behavior is now skipped when the file is closing. This fixes a potential issue discovered by Valgind on Windows where potentially garbage data would be availble for manipulation. * Added brackets to some code in the tagged entry evict iterators so that the flag that determines if progress was made only gets set if things are actually evicted. This prevents an infinite loop (and emits an error) when pinned entries prevent eviction and thus progress.
Diffstat (limited to 'src/H5Gint.c')
-rw-r--r--src/H5Gint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 90c011a..95682d9 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -502,7 +502,7 @@ H5G_close(H5G_t *grp)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
/* Evict group metadata if evicting on close */
- if(H5F_SHARED(grp->oloc.file) && H5F_EVICT_ON_CLOSE(grp->oloc.file)) {
+ if(!H5F_CLOSING(grp->oloc.file) && H5F_SHARED(grp->oloc.file) && H5F_EVICT_ON_CLOSE(grp->oloc.file)) {
if(H5AC_flush_tagged_metadata(grp->oloc.file, grp->oloc.addr, H5AC_ind_read_dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata")
if(H5AC_evict_tagged_metadata(grp->oloc.file, grp->oloc.addr, FALSE, H5AC_ind_read_dxpl_id) < 0)