diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-11-20 16:57:46 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-11-20 16:57:46 (GMT) |
commit | 4e7b19f8260a7adb0e3b3df30e2d8289fccdcca6 (patch) | |
tree | a8527d110745f16d07ef1fd8a29e8eea84ed57e5 /src/H5Ctag.c | |
parent | e10c0e7894699a4113074cd3e9212bafe56a5b40 (diff) | |
download | hdf5-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/H5Ctag.c')
-rw-r--r-- | src/H5Ctag.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5Ctag.c b/src/H5Ctag.c index fb7ef53..33f7c22 100644 --- a/src/H5Ctag.c +++ b/src/H5Ctag.c @@ -465,11 +465,12 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx) entry and we'll loop back around again (as evicting other entries will hopefully unpin this entry) */ ctx->pinned_entries_need_evicted = TRUE; - else + else { /* Evict the Entry */ if(H5C__flush_single_entry(ctx->f, ctx->dxpl_id, entry, H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Entry eviction failed.") - ctx->evicted_entries_last_pass = TRUE; + ctx->evicted_entries_last_pass = TRUE; + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) |