summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2021-10-01 19:28:50 (GMT)
committerGitHub <noreply@github.com>2021-10-01 19:28:50 (GMT)
commit22cdccb799a3ea1f65fdf0c938e5a7c6ebf534f1 (patch)
tree60809223bd2a8e5d04c1b39c87cd005695bbe3d3
parent1f7ddf47f51b2c6c0321718f5844c6400151ad1e (diff)
downloadhdf5-22cdccb799a3ea1f65fdf0c938e5a7c6ebf534f1.zip
hdf5-22cdccb799a3ea1f65fdf0c938e5a7c6ebf534f1.tar.gz
hdf5-22cdccb799a3ea1f65fdf0c938e5a7c6ebf534f1.tar.bz2
Fix bug with cross platform compatibility of references within vlens. (#1064)
No testing yet.
-rw-r--r--release_docs/RELEASE.txt9
-rw-r--r--src/H5Tconv.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index ec558c6..bf14fbc 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1008,6 +1008,15 @@ Bug Fixes since HDF5-1.12.0 release
===================================
Library
-------
+ - Fixed cross platform incompatibility of references within variable length
+ types
+
+ Reference types within variable length types previously could not be
+ read on a platform with different endianness from where they were
+ written. Fixed so cross platform portability is restored.
+
+ (NAF - 2021/09/30)
+
- Detection of simple data transform function "x"
In the case of the simple data transform function "x" the (parallel)
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 18cbcf1..273bb23 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -3205,14 +3205,14 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy src type for conversion")
/* References need to know about the src file */
if (tsrc_cpy->shared->type == H5T_REFERENCE)
- if (H5T_set_loc(tsrc_cpy, src->shared->u.vlen.file, H5T_LOC_MEMORY) < 0)
+ if (H5T_set_loc(tsrc_cpy, src->shared->u.vlen.file, src->shared->u.vlen.loc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
if (NULL == (tdst_cpy = H5T_copy(dst->shared->parent, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy dst type for conversion")
/* References need to know about the dst file */
if (tdst_cpy->shared->type == H5T_REFERENCE)
- if (H5T_set_loc(tdst_cpy, dst->shared->u.vlen.file, H5T_LOC_MEMORY) < 0)
+ if (H5T_set_loc(tdst_cpy, dst->shared->u.vlen.file, dst->shared->u.vlen.loc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
if (((tsrc_id = H5I_register(H5I_DATATYPE, tsrc_cpy, FALSE)) < 0) ||