Merge pull request #2693 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/HDFFV-11080-heap-use-after-free-by-the-call to develop

* commit '3023b34272cc6ada84aebfa7441a6a55afa3621c':
  Update MANIFEST. Add new test to Cmake.
  Fix for jira issue HDFFV-11080: (1) Patch up the file pointer when reading attribute of variable length datatype (2) Test to verify the fix when doing multiple threads
This commit is contained in:
Vailin Choi
2020-07-17 14:27:12 -05:00
committed by vchoi
parent 0ee5d67621
commit ccf4a92ec6
7 changed files with 198 additions and 1 deletions

View File

@@ -613,6 +613,10 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, 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_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer")
/* Create buffer for data to store on disk */
if((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid")