summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-05-25 17:47:46 (GMT)
committerGitHub <noreply@github.com>2023-05-25 17:47:46 (GMT)
commit1e52bc27ee2b491921ca1eb66790094eaaeb6dea (patch)
tree1d46cc96a283a564cae24ec7c1feb50e759fe6fb /java
parent018ca4e37f52e13db5e72926ad2827460eec9cdd (diff)
downloadhdf5-1e52bc27ee2b491921ca1eb66790094eaaeb6dea.zip
hdf5-1e52bc27ee2b491921ca1eb66790094eaaeb6dea.tar.gz
hdf5-1e52bc27ee2b491921ca1eb66790094eaaeb6dea.tar.bz2
Fix assert in Debug Windows Java JNI (#3012)
Use of an uninitialized H5L_info2_t struct caused some JNI tests to raise asserts, causing a dialog box to be emitted, which would hang automated tests. Initializing the struct fixes the problem. This change also re-enables tests in the Windows Debug GitHub actions.
Diffstat (limited to 'java')
-rw-r--r--java/src/jni/h5lImp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c
index 1f2e8d8..5389600 100644
--- a/java/src/jni/h5lImp.c
+++ b/java/src/jni/h5lImp.c
@@ -277,7 +277,7 @@ done:
JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1info(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_id)
{
- H5L_info2_t infobuf;
+ H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, 0};
const char *linkName = NULL;
jvalue args[5];
herr_t status = FAIL;
@@ -340,7 +340,7 @@ JNIEXPORT jobject JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1info_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jint index_field, jint order, jlong link_n, jlong access_id)
{
- H5L_info2_t infobuf;
+ H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, 0};
const char *groupName = NULL;
jvalue args[5];
herr_t status = FAIL;
@@ -454,7 +454,7 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Lget_1value(JNIEnv *env, jclass clss, jlong loc_id, jstring name,
jobjectArray link_value, jlong access_id)
{
- H5L_info2_t infobuf;
+ H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, 0};
const char *file_name = NULL;
const char *obj_name = NULL;
const char *linkName = NULL;
@@ -544,7 +544,7 @@ Java_hdf_hdf5lib_H5_H5Lget_1value_1by_1idx(JNIEnv *env, jclass clss, jlong loc_i
jint index_field, jint order, jlong link_n,
jobjectArray link_value, jlong access_id)
{
- H5L_info2_t infobuf;
+ H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, 0};
const char *file_name = NULL;
const char *obj_name = NULL;
const char *grpName = NULL;