summaryrefslogtreecommitdiffstats
path: root/src/H5FDsubfiling
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-06-28 04:36:12 (GMT)
committerGitHub <noreply@github.com>2023-06-28 04:36:12 (GMT)
commitf5ca9237a296f6deefb633b6fb1d61daea4b4f6e (patch)
tree1c1777f6377a450edd0e675921c51e2a8394c7c0 /src/H5FDsubfiling
parent7d1fdb2d277530eec6d1c8ff937634e7028892aa (diff)
downloadhdf5-f5ca9237a296f6deefb633b6fb1d61daea4b4f6e.zip
hdf5-f5ca9237a296f6deefb633b6fb1d61daea4b4f6e.tar.gz
hdf5-f5ca9237a296f6deefb633b6fb1d61daea4b4f6e.tar.bz2
Fix assertion failure when attempting to use IOC VFD directly (#3187)
Diffstat (limited to 'src/H5FDsubfiling')
-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 c9fc920..d403e3c 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