summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST8
-rw-r--r--release_docs/RELEASE.txt11
-rw-r--r--tools/test/h5dump/CMakeTests.cmake5
-rw-r--r--tools/test/h5dump/testh5dump.sh.in6
-rw-r--r--tools/test/h5stat/CMakeTests.cmake18
-rw-r--r--tools/test/h5stat/testh5stat.sh.in14
6 files changed, 50 insertions, 12 deletions
diff --git a/MANIFEST b/MANIFEST
index 940bd2d..79c2ef6 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1562,6 +1562,12 @@
./tools/test/h5stat/testfiles/h5stat_err1_links.ddl
./tools/test/h5stat/testfiles/h5stat_err1_numattrs.ddl
./tools/test/h5stat/testfiles/h5stat_err2_numattrs.ddl
+./tools/test/h5stat/testfiles/h5stat_err_old_fill.h5
+./tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl
+./tools/test/h5stat/testfiles/h5stat_err_old_layout.h5
+./tools/test/h5stat/testfiles/h5stat_err_old_layout.ddl
+./tools/test/h5stat/testfiles/h5stat_err_refcount.h5
+./tools/test/h5stat/testfiles/h5stat_err_refcount.ddl
./tools/test/h5stat/testfiles/h5stat_filters.ddl
./tools/test/h5stat/testfiles/h5stat_filters-d.ddl
./tools/test/h5stat/testfiles/h5stat_filters-dT.ddl
@@ -1597,6 +1603,8 @@
# h5dump test files
./tools/testfiles/charsets.h5
./tools/testfiles/charsets.ddl
+./tools/testfiles/err_attr_dspace.h5
+./tools/testfiles/err_attr_dspace.ddl
./tools/testfiles/family_file00000.h5
./tools/testfiles/family_file00001.h5
./tools/testfiles/family_file00002.h5
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index f3c6557..ea9894f 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -99,6 +99,17 @@ Bug Fixes since HDF5-1.10.2 release
Library
-------
+ - Error checks in h5stat and when decoding messages
+
+ h5stat exited with seg fault/core dumped when
+ errors are encountered in the internal library.
+
+ Add error checks and --enable-error-stack option to h5stat.
+ Add range checks when decoding messages: old fill value, old
+ layout and refcount.
+
+ (VC - 2018/07/11, HDFFV-10333)
+
- If an HDF5 file contains a malformed compound datatype with a
suitably large offset, the type conversion code can run off
the end of the type conversion buffer, causing a segmentation
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index cdd3e6d..132fc2b 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -21,6 +21,7 @@
# --------------------------------------------------------------------
set (HDF5_REFERENCE_FILES
${HDF5_TOOLS_DIR}/testfiles/charsets.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/err_attr_dspace.ddl
${HDF5_TOOLS_DIR}/testfiles/file_space.ddl
${HDF5_TOOLS_DIR}/testfiles/filter_fail.ddl
${HDF5_TOOLS_DIR}/testfiles/non_existing.ddl
@@ -217,6 +218,7 @@
)
set (HDF5_REFERENCE_TEST_FILES
${HDF5_TOOLS_DIR}/testfiles/charsets.h5
+ ${HDF5_TOOLS_DIR}/testfiles/err_attr_dspace.h5
${HDF5_TOOLS_DIR}/testfiles/file_space.h5
${HDF5_TOOLS_DIR}/testfiles/filter_fail.h5
${HDF5_TOOLS_DIR}/testfiles/packedbits.h5
@@ -1533,6 +1535,9 @@
# test for non-existing file
ADD_H5_TEST (non_existing 1 --enable-error-stack tgroup.h5 non_existing.h5)
+ # test to verify HDFFV-10333: error similar to H5O_attr_decode in the jira issue
+ ADD_H5_TEST (err_attr_dspace 1 err_attr_dspace.h5)
+
##############################################################################
### P L U G I N T E S T S
##############################################################################
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index a2ec035..42e4b07 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -1324,9 +1324,6 @@ TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5
TOOLTEST4 tattrregR.ddl --enable-error-stack -R tattrreg.h5
TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.txt tdatareg.h5
-# test to verify HDFFV-10333: error similar to H5O_attr_decode in the jira issue
-TOOLTEST err_attr_dspace.ddl err_attr_dspace.h5
-
# Clean up text output files
if test -z "$HDF5_NOCLEANUP"; then
rm -f tbinregR.txt
@@ -1369,6 +1366,9 @@ TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1
# test for non-existing file
TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5
+# test to verify HDFFV-10333: error similar to H5O_attr_decode in the jira issue
+TOOLTEST err_attr_dspace.ddl err_attr_dspace.h5
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake
index 69bab20..bd55ac1 100644
--- a/tools/test/h5stat/CMakeTests.cmake
+++ b/tools/test/h5stat/CMakeTests.cmake
@@ -20,6 +20,9 @@
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
set (HDF5_REFERENCE_FILES
+ h5stat_err_refcount
+ h5stat_err_old_layout
+ h5stat_err_old_fill
h5stat_help1
h5stat_help2
h5stat_notexist
@@ -54,6 +57,9 @@
h5stat_numattrs4
)
set (HDF5_REFERENCE_TEST_FILES
+ h5stat_err_refcount.h5
+ h5stat_err_old_layout.h5
+ h5stat_err_old_fill.h5
h5stat_filters.h5
h5stat_idx.h5
h5stat_tsohm.h5
@@ -160,9 +166,7 @@
ADD_H5_TEST (h5stat_newgrat-UG 0 -G h5stat_newgrat.h5)
ADD_H5_TEST (h5stat_newgrat-UA 0 -A h5stat_newgrat.h5)
# h5stat_idx.h5 is generated by h5stat_gentest.c
- if (HDF5_BUILD_GENERATORS)
- ADD_H5_TEST (h5stat_idx 0 h5stat_idx.h5)
- endif ()
+ ADD_H5_TEST (h5stat_idx 0 h5stat_idx.h5)
#
# Tests for -l (--links) option on h5stat_threshold.h5:
# -l 0 (incorrect threshold value)
@@ -204,3 +208,11 @@
# -A -a 100
ADD_H5_TEST (h5stat_numattrs4 0 -A -a 100 h5stat_newgrat.h5)
#
+# Tests to verify HDFFV-10333:
+# h5stat_err_refcount.h5 is generated by h5stat_gentest.c
+# h5stat_err_old_layout.h5 and h5stat_err_old_fill.h5: see explanation in h5stat_gentest.c
+ ADD_H5_TEST (h5stat_err_refcount 1 h5stat_err_refcount.h5)
+ ADD_H5_TEST (h5stat_err_old_layout 1 h5stat_err_old_layout.h5)
+ ADD_H5_TEST (h5stat_err_old_fill 1 h5stat_err_old_fill.h5)
+#
+#
diff --git a/tools/test/h5stat/testh5stat.sh.in b/tools/test/h5stat/testh5stat.sh.in
index d178b0d..5082daf 100644
--- a/tools/test/h5stat/testh5stat.sh.in
+++ b/tools/test/h5stat/testh5stat.sh.in
@@ -69,17 +69,20 @@ test -d $TESTDIR || mkdir $TESTDIR
# Comment '#' without space can be used.
# --------------------------------------------------------------------
LIST_HDF5_TEST_FILES="
+$SRC_H5STAT_TESTFILES/h5stat_err_refcount.h5
+$SRC_H5STAT_TESTFILES/h5stat_err_old_layout.h5
+$SRC_H5STAT_TESTFILES/h5stat_err_old_fill.h5
$SRC_H5STAT_TESTFILES/h5stat_filters.h5
$SRC_H5STAT_TESTFILES/h5stat_tsohm.h5
$SRC_H5STAT_TESTFILES/h5stat_newgrat.h5
$SRC_H5STAT_TESTFILES/h5stat_idx.h5
$SRC_H5STAT_TESTFILES/h5stat_threshold.h5
-$SRC_H5STAT_TESTFILES/h5stat_err_refcount.h5
-$SRC_H5STAT_TESTFILES/h5stat_err_old_layout.h5
-$SRC_H5STAT_TESTFILES/h5stat_err_old_fill.h5
"
LIST_OTHER_TEST_FILES="
+$SRC_H5STAT_TESTFILES/h5stat_err_refcount.ddl
+$SRC_H5STAT_TESTFILES/h5stat_err_old_layout.ddl
+$SRC_H5STAT_TESTFILES/h5stat_err_old_fill.ddl
$SRC_H5STAT_TESTFILES/h5stat_help1.ddl
$SRC_H5STAT_TESTFILES/h5stat_help2.ddl
$SRC_H5STAT_TESTFILES/h5stat_notexist.ddl
@@ -112,9 +115,6 @@ $SRC_H5STAT_TESTFILES/h5stat_numattrs1.ddl
$SRC_H5STAT_TESTFILES/h5stat_numattrs2.ddl
$SRC_H5STAT_TESTFILES/h5stat_numattrs3.ddl
$SRC_H5STAT_TESTFILES/h5stat_numattrs4.ddl
-$SRC_H5STAT_TESTFILES/h5stat_err_refcount.ddl
-$SRC_H5STAT_TESTFILES/h5stat_err_old_layout.ddl
-$SRC_H5STAT_TESTFILES/h5stat_err_old_fill.ddl
"
#
@@ -313,6 +313,8 @@ TOOLTEST h5stat_numattrs4.ddl -A -a 100 h5stat_newgrat.h5
#
#
# Tests to verify HDFFV-10333
+# h5stat_err_refcount.h5 is generated by h5stat_gentest.c
+# h5stat_err_old_layout.h5 and h5stat_err_old_fill.h5: see explanation in h5stat_gentest.c
TOOLTEST h5stat_err_refcount.ddl h5stat_err_refcount.h5
TOOLTEST h5stat_err_old_layout.ddl h5stat_err_old_layout.h5
TOOLTEST h5stat_err_old_fill.ddl h5stat_err_old_fill.h5