From b5867a05a7adf5d1c89721bf42a5bbaddb47dbd9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 13 Mar 2018 17:21:02 -0500 Subject: HDFFV-10412 add error on function for Java --- java/src/hdf/hdf5lib/H5.java | 8 +++++++- java/src/jni/exceptionImp.c | 17 +++++++++++++++++ java/src/jni/exceptionImp.h | 10 ++++++++++ java/src/jni/h5util.c | 3 +++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 20aa634..9d1aed1 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -424,7 +424,7 @@ public class H5 implements java.io.Serializable { private synchronized static native int H5dont_atexit() throws HDF5LibraryException; /** - * Turn off error handling By default, the C library prints the error stack of the HDF-5 C library on stdout. This + * Turn off error handling. By default, the C library prints the error stack of the HDF-5 C library on stdout. This * behavior may be disabled by calling H5error_off(). * * @return a non-negative value if successful @@ -432,6 +432,12 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5error_off(); /** + * Turn on error handling. By default, the C library prints the error stack of the HDF-5 C library on stdout. This + * behavior may be reenabled by calling H5error_on(). + */ + public synchronized static native void H5error_on(); + + /** * H5garbage_collect collects on all free-lists of all types. * * @return a non-negative value if successful diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index 05c193f..afad5d5 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -33,6 +33,9 @@ extern "C" { #include "h5jni.h" #include "exceptionImp.h" +extern H5E_auto2_t efunc; +extern void *edata; + /*******************/ /* Local Variables */ @@ -122,10 +125,24 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5error_1off (JNIEnv *env, jclass clss) { + H5Eget_auto2(H5E_DEFAULT, &efunc, &edata); H5Eset_auto2(H5E_DEFAULT, NULL, NULL); return 0; } /* end Java_hdf_hdf5lib_H5_H5error_1off() */ +/* + * Class: hdf_hdf5lib_exceptions_HDF5Library + * Method: H5error_on + * Signature: ()V + * + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5error_1on + (JNIEnv *env, jclass clss) +{ + H5Eset_auto2(H5E_DEFAULT, efunc, edata); +} /* end Java_hdf_hdf5lib_H5_H5error_1on() */ + /* * Class: hdf_hdf5lib_exceptions_HDFLibraryException diff --git a/java/src/jni/exceptionImp.h b/java/src/jni/exceptionImp.h index cb74602..423e537 100644 --- a/java/src/jni/exceptionImp.h +++ b/java/src/jni/exceptionImp.h @@ -31,6 +31,16 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5error_1off (JNIEnv *env, jclass clss ); +/* + * Class: hdf_hdf5lib_exceptions_HDF5Library + * Method: H5error_on + * Signature: ()V + * + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5error_1on + (JNIEnv *env, jclass clss ); + /* * Class: hdf_hdf5lib_exceptions_HDFLibraryException diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index bd9fc0f..fdabd76 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -41,6 +41,9 @@ jobject get_callback; jobject set_callback; jobject delete_callback; +H5E_auto2_t efunc; +void *edata; + /********************/ /* Local Prototypes */ /********************/ -- cgit v0.12 From 0d5c1153f1e8b55784512a3cb722bda94e1b2080 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 14 Mar 2018 11:13:16 -0500 Subject: Add info to release notes for: (1) library version bounds (2) HDFFV-10360 (h5clear) (3) HDFFV-10209 (VDS SWMR test failure) --- release_docs/RELEASE.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 9dc7f3a..cfa0b1c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -86,6 +86,19 @@ New Features Library: -------- + - Add an enumerated value to H5F_libver_t for H5Pset_libver_bounds(). + + Currently, the library defines two values for H5F_libver_t and supports + only two pairs of (low, high) combinations as derived from these values. + Thus the bounds setting via H5Pset_libver_bounds() is rather restricted. + + Add an enumerated value (H5F_LIBVER_V18) to H5F_libver_t and + H5Pset_libver_bounds() now supports five pairs of (low, high) combinations + as derived from these values. This addition provides the user more + flexibility in setting bounds for object creation. + + (VC - 2018/03/14) + - Add prefix option to VDS files. Currently, VDS source files must be in the active directory to be @@ -271,6 +284,17 @@ Bug Fixes since HDF5-1.10.1 release Library ------- + - Freeing of object header in H5Ocache.c + + It was discovered that the object header was not released properly + when the checksum verification failed and a re-load of the object + header was needed. + + Free the object header that failed the chksum verification only + after the new object header is reloaded, deserialized and set up. + + (VC - 2018/03/14, HDFFV-10209) + - H5Pset_evict_on_close in H5Pfapl.c Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for @@ -492,6 +516,20 @@ Bug Fixes since HDF5-1.10.1 release Tools ----- + - h5clear + + An enhancement to the tool in setting a file's stored EOA. + + It was discovered that a crashed file's stored EOA in the superblock + was smaller than the actual file's EOF. When the file was reopened + and closed, the library truncated the file to the stored EOA. + + Add an option to the tool in setting the file's stored EOA in the + superblock to the maximum of (EOA, EOF) + increment. + Another option is also added to print the file's EOA and EOF. + + (VC - 2018/03/14, HDFFV-10360) + - h5repack h5repack changes the chunk parameters when a change of layout is not -- cgit v0.12 From ab0e9cac87b14ddf780827995d2480dc0ea09f32 Mon Sep 17 00:00:00 2001 From: lrknox Date: Wed, 14 Mar 2018 14:03:39 -0500 Subject: Resolve merge conlicts in RELEASE.txt. --- release_docs/RELEASE.txt | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 72afd84..73c9614 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -115,6 +115,19 @@ New Features Library: -------- + - Add an enumerated value to H5F_libver_t for H5Pset_libver_bounds(). + + Currently, the library defines two values for H5F_libver_t and supports + only two pairs of (low, high) combinations as derived from these values. + Thus the bounds setting via H5Pset_libver_bounds() is rather restricted. + + Add an enumerated value (H5F_LIBVER_V18) to H5F_libver_t and + H5Pset_libver_bounds() now supports five pairs of (low, high) combinations + as derived from these values. This addition provides the user more + flexibility in setting bounds for object creation. + + (VC - 2018/03/14) + - Add prefix option to VDS files. Currently, VDS source files must be in the active directory to be @@ -346,12 +359,6 @@ Bug Fixes since HDF5-1.10.1 release Library ------- - - Utility function can not handle lowercase Windows drive letters - - Added call to toupper function for drive letter. - - (ADB - 2017/12/18, HDFFV-10307) - - Fix H5Sencode() bug when the number of elements selected is > 2^32 H5Sencode() incorrectly encodes dataspace selection with number of @@ -368,6 +375,17 @@ Bug Fixes since HDF5-1.10.1 release (VC - 2017/11/28, HDFFV-9947) + - Freeing of object header in H5Ocache.c + + It was discovered that the object header was not released properly + when the checksum verification failed and a re-load of the object + header was needed. + + Free the object header that failed the chksum verification only + after the new object header is reloaded, deserialized and set up. + + (VC - 2018/03/14, HDFFV-10209) + - H5Pset_evict_on_close in H5Pfapl.c Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for @@ -700,6 +718,20 @@ Bug Fixes since HDF5-1.10.1 release Tools ----- + - h5clear + + An enhancement to the tool in setting a file's stored EOA. + + It was discovered that a crashed file's stored EOA in the superblock + was smaller than the actual file's EOF. When the file was reopened + and closed, the library truncated the file to the stored EOA. + + Add an option to the tool in setting the file's stored EOA in the + superblock to the maximum of (EOA, EOF) + increment. + Another option is also added to print the file's EOA and EOF. + + (VC - 2018/03/14, HDFFV-10360) + - h5repack h5repack changes the chunk parameters when a change of layout is not -- cgit v0.12 From d75948e15e94a0d33cb68b81856f4b44734bae2a Mon Sep 17 00:00:00 2001 From: lrknox Date: Wed, 14 Mar 2018 15:29:30 -0500 Subject: Revised RELEASE.txt. --- release_docs/RELEASE.txt | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 73c9614..172e36b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -359,22 +359,6 @@ Bug Fixes since HDF5-1.10.1 release Library ------- - - Fix H5Sencode() bug when the number of elements selected is > 2^32 - - H5Sencode() incorrectly encodes dataspace selection with number of - elements exceeding 2^32. When decoding such selection via H5Sdecode(), - the number of elements in the decoded dataspace is not the same as - what is encoded. This problem exists for H5S_SEL_HYPER and - H5S_SEL_POINTS encoding. - - The cause of the problem is because the library uses 32 bits to - encode counts and block offsets for the selection. - The solution is to use the original 32 bit encodings if possible, - but use a different way to encode selection > 32 bits when needed. - See details in the RFC: H5Sencode/H5Secode Format Change. - - (VC - 2017/11/28, HDFFV-9947) - - Freeing of object header in H5Ocache.c It was discovered that the object header was not released properly @@ -390,7 +374,8 @@ Bug Fixes since HDF5-1.10.1 release Changed the minor error number from H5E_CANTSET to H5E_UNSUPPORTED for parallel library. - (ADB - 2018/03/6, HDFFV-10414) + + (ADB - 2018/03/06, HDFFV-10414) - Utility function can not handle lowercase Windows drive letters @@ -398,7 +383,23 @@ Bug Fixes since HDF5-1.10.1 release (ADB - 2017/12/18, HDFFV-10307) - - filter plugin handling in H5PL.c and H5Z.c + - Fix H5Sencode() bug when the number of elements selected is > 2^32 + + H5Sencode() incorrectly encodes dataspace selection with number of + elements exceeding 2^32. When decoding such selection via H5Sdecode(), + the number of elements in the decoded dataspace is not the same as + what is encoded. This problem exists for H5S_SEL_HYPER and + H5S_SEL_POINTS encoding. + + The cause of the problem is because the library uses 32 bits to + encode counts and block offsets for the selection. + The solution is to use the original 32 bit encodings if possible, + but use a different way to encode selection > 32 bits when needed. + See details in the RFC: H5Sencode/H5Secode Format Change. + + (VC - 2017/11/28, HDFFV-9947) + + - Filter plugin handling in H5PL.c and H5Z.c It was discovered that the dynamic loading process used by filter plugins had issues with library dependencies. @@ -407,7 +408,8 @@ Bug Fixes since HDF5-1.10.1 release allowed HDF5 C library to make dependent libraries private. The filter plugin libraries no longer require dependent libraries (such as szip or zlib) to be available. - (ADB - 2017/11/16, HDFFV-10328) + + (ADB - 2017/11/16, HDFFV-10328) - Fix rare object header corruption bug -- cgit v0.12