summaryrefslogtreecommitdiffstats
path: root/src/H5Aint.c
diff options
context:
space:
mode:
authorNeil Fortner <fortnern@gmail.com>2022-11-05 19:46:36 (GMT)
committerGitHub <noreply@github.com>2022-11-05 19:46:36 (GMT)
commit559d7d056be22fb9e2f0da69168c9050d448a71c (patch)
treecee844ca1d19adfdd6450b81b74e6620771f7b34 /src/H5Aint.c
parent0ca9e2bfadd0657a536523c4ecbdae3a1e862eed (diff)
downloadhdf5-559d7d056be22fb9e2f0da69168c9050d448a71c.zip
hdf5-559d7d056be22fb9e2f0da69168c9050d448a71c.tar.gz
hdf5-559d7d056be22fb9e2f0da69168c9050d448a71c.tar.bz2
Fix problem with variable length attributes being accessed through multiple file handles (merge to 1.10) (#2223)
* Fix problem with variable length attributes being accessed through multiple file handles (#2181) (#2207) * Fix bug in merge of vlen attr fix (#2181) from 1.12
Diffstat (limited to 'src/H5Aint.c')
-rw-r--r--src/H5Aint.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c
index b377022..d1b74fa 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -721,6 +721,10 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
HDassert(mem_type);
HDassert(buf);
+ /* Patch the top level file pointer in attr->shared->dt->shared->u.vlen.f if needed */
+ if (H5T_patch_vlen_file(attr->shared->dt, attr->oloc.file) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't patch VL datatype file pointer")
+
/* Get # of elements for attribute's dataspace */
if ((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid")