diff options
author | Neil Fortner <fortnern@gmail.com> | 2022-10-25 12:46:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 12:46:15 (GMT) |
commit | 7997b53589ed5fd7967985a87c8f7f757b5e7030 (patch) | |
tree | 5912fab3722581391bc33507d90936e5164f727b /src | |
parent | 93754cae33d4ed45850745664ce5e59f270f38f8 (diff) | |
download | hdf5-7997b53589ed5fd7967985a87c8f7f757b5e7030.zip hdf5-7997b53589ed5fd7967985a87c8f7f757b5e7030.tar.gz hdf5-7997b53589ed5fd7967985a87c8f7f757b5e7030.tar.bz2 |
Fix problem with variable length attributes being accessed through multiple file handles (#2181)
* Fix bug with variable length attributes being accessed through multiple
file handles.
* Committing clang-format changes
Co-authored-by: Neil Fortner <nfortne2@localhost.localdomain>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Aint.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c index e6440bb..dee9c18 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -836,6 +836,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, H5F_VOL_OBJ(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") |