summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-07-27 19:23:53 (GMT)
committerGitHub <noreply@github.com>2023-07-27 19:23:53 (GMT)
commitcb69bc279ce12d078d43f7aa70b2929d8df1c147 (patch)
treec3eb92d85e2bec72bdeaf5e2a5bd415a3237718f /src
parent2bb4c909c4c63cf87d10c494cd76d57092d45335 (diff)
downloadhdf5-cb69bc279ce12d078d43f7aa70b2929d8df1c147.zip
hdf5-cb69bc279ce12d078d43f7aa70b2929d8df1c147.tar.gz
hdf5-cb69bc279ce12d078d43f7aa70b2929d8df1c147.tar.bz2
Fix assertion failure when attempting to use IOC VFD directly (#3187) (#3288)
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/H5FDsubfiling/H5FDioc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c
index 7d20021..dff2d07 100644
--- a/src/H5FDsubfiling/H5FDioc.c
+++ b/src/H5FDsubfiling/H5FDioc.c
@@ -819,6 +819,19 @@ H5FD__ioc_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
/* Retrieve the HDF5 stub file ID for the current file */
if (H5_subfiling_get_file_id_prop(plist_ptr, &file_ptr->file_id) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get stub file ID from FAPL");
+ if (file_ptr->file_id == UINT64_MAX) {
+ /* Since this VFD does no displaying of error stacks itself
+ * (it relies on the Subfiling VFD to do this), we must print
+ * the error stack here if we know it wasn't stacked under the
+ * Subfiling VFD.
+ */
+ H5_SUBFILING_DONE_ERROR(
+ H5E_PLIST, H5E_BADVALUE, NULL,
+ "subfiling stub file ID property was missing from FAPL - IOC VFD wasn't correctly stacked under "
+ "the Subfiling VFD and cannot currently be used alone");
+ PRINT_ERROR_STACK;
+ goto done;
+ }
/*
* Open the subfiles for this HDF5 file. A subfiling