summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2018-12-07 21:43:51 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2018-12-07 21:43:51 (GMT)
commit5a51c3677e25e8426d6cd8532baa46244d645cf9 (patch)
treedf7e0cfa8e31c546f75a16de9e605ddb8d30688f /src
parenta21f1d8aef624d4d266f6914099c7ec0a2b52c24 (diff)
parent4643860aa940fb52da251f7023ec2e48d7d10f34 (diff)
downloadhdf5-5a51c3677e25e8426d6cd8532baa46244d645cf9.zip
hdf5-5a51c3677e25e8426d6cd8532baa46244d645cf9.tar.gz
hdf5-5a51c3677e25e8426d6cd8532baa46244d645cf9.tar.bz2
Merge branch 'develop' into H10621
Diffstat (limited to 'src')
-rw-r--r--src/H5HG.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/H5HG.c b/src/H5HG.c
index b9d8dc3..df1c82d 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -785,7 +785,14 @@ H5HG_remove (H5F_t *f, H5HG_t *hobj)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
HDassert(hobj->idx < heap->nused);
- HDassert(heap->obj[hobj->idx].begin);
+
+ /* When the application selects the same location to rewrite the VL element by using H5Sselect_elements,
+ * it can happen that the entry has been removed by first rewrite. Here we simply skip the removal of
+ * the entry and let the second rewrite happen (see HDFFV-10635). In the future, it'd be nice to handle
+ * this situation in H5T_conv_vlen in H5Tconv.c instead of this level (HDFFV-10648). */
+ if(heap->obj[hobj->idx].nrefs == 0 && heap->obj[hobj->idx].size == 0 && !heap->obj[hobj->idx].begin)
+ HGOTO_DONE(ret_value)
+
obj_start = heap->obj[hobj->idx].begin;
/* Include object header size */
need = H5HG_ALIGN(heap->obj[hobj->idx].size) + H5HG_SIZEOF_OBJHDR(f);