summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-03-20 19:26:14 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-03-20 19:26:14 (GMT)
commitb6b43e6dc4d720c5f356007e3f899333b3c24177 (patch)
treebaa0f8a37cf92fd4caf883f087a7e6eee01aca57
parentcca961774276e67086d771877a6d6c5d6a498077 (diff)
downloadhdf5-b6b43e6dc4d720c5f356007e3f899333b3c24177.zip
hdf5-b6b43e6dc4d720c5f356007e3f899333b3c24177.tar.gz
hdf5-b6b43e6dc4d720c5f356007e3f899333b3c24177.tar.bz2
Protect against an assertion during H5Fflush(): do not doubly-increment
the tick number in H5F_vfd_swmr_close_or_flush() when just flushing, because that made the assertion in H5PB_vfd_swmr__set_tick(), that the tick number had not increased by more than one, fail.
-rw-r--r--src/H5Fvfd_swmr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index 756b51f..8660137 100644
--- a/src/H5Fvfd_swmr.c
+++ b/src/H5Fvfd_swmr.c
@@ -323,11 +323,10 @@ H5F_vfd_swmr_close_or_flush(H5F_t *f, hbool_t closing)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "fail to create header in md")
- /* Increment tick_num */
- ++f->shared->tick_num;
-
if ( closing ) { /* For file close */
+ ++f->shared->tick_num;
+
/* Close the md file */
if(HDclose(f->shared->vfd_swmr_md_fd) < 0)