summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--release_docs/RELEASE.txt22
-rw-r--r--src/H5Gdeprec.c4
-rw-r--r--src/H5VLpassthru.c4
3 files changed, 26 insertions, 4 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index f26d969..7c09c2b 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -538,6 +538,28 @@ Bug Fixes since HDF5-1.10.3 release
(JTH - 2018/08/25, HDFFV-10501)
+ - fcntl(2)-based file locking incorrectly passed the lock argument struct
+ instead of a pointer to the struct, causing errors on systems where
+ flock(2) is not available.
+
+ File locking is used when files are opened to enforce SWMR semantics. A
+ lock operation takes place on all file opens unless the
+ HDF5_USE_FILE_LOCKING environment variable is set to the string "FALSE".
+ flock(2) is preferentially used, with fcntl(2) locks as a backup if
+ flock(2) is unavailable on a system (if neither is available, the lock
+ operation fails). On these systems, the file lock will often fail, which
+ causes HDF5 to not open the file and report an error.
+
+ This bug only affects POSIX systems. Win32 builds on Windows use a no-op
+ locking call which always succeeds. Systems which exhibit this bug will
+ have H5_HAVE_FCNTL defined but not H5_HAVE_FLOCK in the configure output.
+
+ This bug affects HDF5 1.10.0 through 1.10.5.
+
+ fcntl(2)-based file locking now correctly passes the struct pointer.
+
+ (DER - 2019/08/27, HDFFV-10892)
+
Java Library:
----------------
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 5acb378..97a3ccf 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -357,7 +357,7 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new
tmp_vol_obj.connector = vol_obj->connector;
/* Create the link through the VOL */
- if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj->data, loc_params1) < 0)
+ if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj->data, &loc_params1) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
} /* end if */
else if(type == H5L_TYPE_SOFT) {
@@ -437,7 +437,7 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Create the link through the VOL */
- if(H5VL_link_create(H5VL_LINK_CREATE_HARD, vol_obj2, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj1->data, loc_params1) < 0)
+ if(H5VL_link_create(H5VL_LINK_CREATE_HARD, vol_obj2, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj1->data, &loc_params1) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
} /* end if */
else if(type == H5L_TYPE_SOFT) {
diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c
index eecdac2..24070fa 100644
--- a/src/H5VLpassthru.c
+++ b/src/H5VLpassthru.c
@@ -2131,11 +2131,11 @@ H5VL_pass_through_link_create(H5VL_link_create_type_t create_type, void *obj,
/* Fix up the link target object for hard link creation */
if(H5VL_LINK_CREATE_HARD == create_type) {
void *cur_obj;
- H5VL_loc_params_t cur_params;
+ H5VL_loc_params_t *cur_params;
/* Retrieve the object & loc params for the link target */
cur_obj = va_arg(arguments, void *);
- cur_params = va_arg(arguments, H5VL_loc_params_t);
+ cur_params = va_arg(arguments, H5VL_loc_params_t *);
/* If it's a non-NULL pointer, find the 'under object' and re-set the property */
if(cur_obj) {