Skip to content

Commit

Permalink
Update so numbers for libhdf5_java.so due to functions added to Java (#…
Browse files Browse the repository at this point in the history
…1070)

* Update so numbers for libhdf5_java.so due to functions added to Java
API.
Remove -avoid-version flag that supresses so version numbers from java/src/jni/Makefile.am.

* 1.10 Merge ASAN fixes (#1060)

* Merge ASAN fixes

Fix ASAN issue in h5dump error path #1051
ASAN fix for test_ld - free sub-allocation of fields #10

* Merge Rework error allocation free.

Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
  • Loading branch information
lrknox and byrnHDF authored Oct 4, 2021
1 parent 5e3fca1 commit 4feb378
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 63 deletions.
6 changes: 3 additions & 3 deletions c++/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,9 @@ LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 100
LT_HL_F_VERS_REVISION = 7
LT_HL_F_VERS_AGE = 0
LT_JAVA_VERS_INTERFACE = 105
LT_JAVA_VERS_REVISION = 1
LT_JAVA_VERS_AGE = 5
LT_JAVA_VERS_INTERFACE = 106
LT_JAVA_VERS_REVISION = 0
LT_JAVA_VERS_AGE = 6
LT_TOOLS_VERS_INTERFACE = 102
LT_TOOLS_VERS_REVISION = 1
LT_TOOLS_VERS_AGE = 0
Expand Down
6 changes: 3 additions & 3 deletions config/lt_vers.am
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ LT_HL_F_VERS_INTERFACE = 100
LT_HL_F_VERS_REVISION = 7
LT_HL_F_VERS_AGE = 0

LT_JAVA_VERS_INTERFACE = 105
LT_JAVA_VERS_REVISION = 1
LT_JAVA_VERS_AGE = 5
LT_JAVA_VERS_INTERFACE = 106
LT_JAVA_VERS_REVISION = 0
LT_JAVA_VERS_AGE = 6

LT_TOOLS_VERS_INTERFACE = 102
LT_TOOLS_VERS_REVISION = 1
Expand Down
6 changes: 3 additions & 3 deletions fortran/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -849,9 +849,9 @@ LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 100
LT_HL_F_VERS_REVISION = 7
LT_HL_F_VERS_AGE = 0
LT_JAVA_VERS_INTERFACE = 105
LT_JAVA_VERS_REVISION = 1
LT_JAVA_VERS_AGE = 5
LT_JAVA_VERS_INTERFACE = 106
LT_JAVA_VERS_REVISION = 0
LT_JAVA_VERS_AGE = 6
LT_TOOLS_VERS_INTERFACE = 102
LT_TOOLS_VERS_REVISION = 1
LT_TOOLS_VERS_AGE = 0
Expand Down
6 changes: 3 additions & 3 deletions hl/c++/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,9 @@ LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 100
LT_HL_F_VERS_REVISION = 7
LT_HL_F_VERS_AGE = 0
LT_JAVA_VERS_INTERFACE = 105
LT_JAVA_VERS_REVISION = 1
LT_JAVA_VERS_AGE = 5
LT_JAVA_VERS_INTERFACE = 106
LT_JAVA_VERS_REVISION = 0
LT_JAVA_VERS_AGE = 6
LT_TOOLS_VERS_INTERFACE = 102
LT_TOOLS_VERS_REVISION = 1
LT_TOOLS_VERS_AGE = 0
Expand Down
6 changes: 3 additions & 3 deletions hl/fortran/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -839,9 +839,9 @@ LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 100
LT_HL_F_VERS_REVISION = 7
LT_HL_F_VERS_AGE = 0
LT_JAVA_VERS_INTERFACE = 105
LT_JAVA_VERS_REVISION = 1
LT_JAVA_VERS_AGE = 5
LT_JAVA_VERS_INTERFACE = 106
LT_JAVA_VERS_REVISION = 0
LT_JAVA_VERS_AGE = 6
LT_TOOLS_VERS_INTERFACE = 102
LT_TOOLS_VERS_REVISION = 1
LT_TOOLS_VERS_AGE = 0
Expand Down
70 changes: 36 additions & 34 deletions hl/src/H5LD.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ static herr_t H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsi
* Function: H5LD_clean_vector
*
* Purpose: Process the vector of info:
* 1) free the array of pointers to member names in listv[n]
* 2) close the type id of the last member in listv[n]
* 3) free the H5LD_memb_t structure itself as pointed to by listv[n]
* 1) free the array of pointers to member names in listv[n]
* 2) close the type id of the last member in listv[n]
* 3) free the H5LD_memb_t structure itself as pointed to by listv[n]
*
* Return: void
*
Expand Down Expand Up @@ -69,12 +69,12 @@ H5LD_clean_vector(H5LD_memb_t *listv[])
* Function: H5LD_construct_info()
*
* Purpose: Get the remaining info for a field:
* 1) Get the type id of the last member in the field
* 2) Get the total offset of all the members in the field
* 3) Get the type size of the last member in the field
* 1) Get the type id of the last member in the field
* 2) Get the total offset of all the members in the field
* 3) Get the type size of the last member in the field
*
* Return: Success: 0
* Failure: negative
* Failure: negative
*
* Programmer: Vailin Choi; Aug 2010
*
Expand Down Expand Up @@ -129,24 +129,24 @@ H5LD_construct_info(H5LD_memb_t *memb, hid_t par_tid)
* Function: H5LD_construct_vector
*
* Purpose: Process the comma-separated list of fields in "fields" as follows:
* Example:
* "fields": "a.b.c,d"
* listv[0]->tot_offset = total offset of "a" & "b" & "c"
* listv[0]->last_tid = type id of "c"
* listv[0]->last_tsize = type size of "c"
* listv[0]->names[0] = "a"
* listv[0]->names[1] = "b"
* listv[0]->names[2] = "c"
* listv[0]->names[3] = NULL
*
* listv[1]->tot_offset = offset of "d"
* listv[1]->last_tid = type id of "d"
* listv[1]->last_tsize = type size of "d"
* listv[1]->names[0] = "d"
* listv[1]->names[1] = NULL
* Example:
* "fields": "a.b.c,d"
* listv[0]->tot_offset = total offset of "a" & "b" & "c"
* listv[0]->last_tid = type id of "c"
* listv[0]->last_tsize = type size of "c"
* listv[0]->names[0] = "a"
* listv[0]->names[1] = "b"
* listv[0]->names[2] = "c"
* listv[0]->names[3] = NULL
*
* listv[1]->tot_offset = offset of "d"
* listv[1]->last_tid = type id of "d"
* listv[1]->last_tsize = type size of "d"
* listv[1]->names[0] = "d"
* listv[1]->names[1] = NULL
*
* Return: Success: # of comma-separated fields in "fields"
* Failure: negative value
* Failure: negative value
*
* Programmer: Vailin Choi; Aug 2010
*
Expand Down Expand Up @@ -251,8 +251,10 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid)
goto done;
} /* end if */
else {
if (memb)
if (memb) {
HDfree(memb->names);
HDfree(memb);
}
goto done;
} /* end else */
} /* while !end_of_fields */
Expand All @@ -272,10 +274,10 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid)
* Function: H5LD_get_dset_dims
*
* Purpose: To return the current size for each dimension of the
* dataset's dataspace
* dataset's dataspace
*
* Return: Success: 0
* Failure: negative value
* Failure: negative value
*
* Programmer: Vailin Choi; March 2010
*
Expand Down Expand Up @@ -316,12 +318,12 @@ H5LD_get_dset_dims(hid_t did, hsize_t *cur_dims)
* Function: H5LD_get_dset_type_size
*
* Purpose: To return the size of the dataset's datatype in bytes
* null "fields": return the size of the dataset's datatype
* non-null "fields": return the size of the dataset's datatype
* with respect to the selection in "fields"
* null "fields": return the size of the dataset's datatype
* non-null "fields": return the size of the dataset's datatype
* with respect to the selection in "fields"
*
* Return: Success: size of the dataset's datatype
* Failure: 0 (valid datatypes are never zero size)
* Failure: 0 (valid datatypes are never zero size)
*
* Programmer: Vailin Choi; March 2010
*
Expand Down Expand Up @@ -402,7 +404,7 @@ H5LD_get_dset_type_size(hid_t did, const char *fields)
* Purpose: To retrieve selected data from the dataset
*
* Return: Success: 0
* Failure: negative
* Failure: negative
*
* Programmer: Vailin Choi; August 2010
*
Expand Down Expand Up @@ -578,7 +580,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
* Purpose: To retrieve the current dimension sizes for a dataset
*
* Return: Success: 0
* Failure: negative value
* Failure: negative value
*
* Programmer: Vailin Choi; March 2010
*
Expand All @@ -596,7 +598,7 @@ H5LDget_dset_dims(hid_t did, hsize_t *cur_dims)
* Purpose: To return the size in bytes of the datatype for the dataset
*
* Return: Success: size in bytes of the dataset's datatype
* Failure: 0 (valid datatypes are never zero size)
* Failure: 0 (valid datatypes are never zero size)
*
* Programmer: Vailin Choi; March 2010
*
Expand All @@ -614,7 +616,7 @@ H5LDget_dset_type_size(hid_t did, const char *fields)
* Purpose: To retrieve selected data from the dataset
*
* Return: Success: 0
* Failure: negative value
* Failure: negative value
*
* Programmer: Vailin Choi; March 2010
*
Expand Down
6 changes: 3 additions & 3 deletions hl/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,9 @@ LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 100
LT_HL_F_VERS_REVISION = 7
LT_HL_F_VERS_AGE = 0
LT_JAVA_VERS_INTERFACE = 105
LT_JAVA_VERS_REVISION = 1
LT_JAVA_VERS_AGE = 5
LT_JAVA_VERS_INTERFACE = 106
LT_JAVA_VERS_REVISION = 0
LT_JAVA_VERS_AGE = 6
LT_TOOLS_VERS_INTERFACE = 102
LT_TOOLS_VERS_REVISION = 1
LT_TOOLS_VERS_AGE = 0
Expand Down
2 changes: 1 addition & 1 deletion java/src/jni/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS)
lib_LTLIBRARIES=libhdf5_java.la

# Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am)
libhdf5_java_la_LDFLAGS = -avoid-version -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS)
libhdf5_java_la_LDFLAGS = -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS)

# Source files for the library
libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \
Expand Down
8 changes: 4 additions & 4 deletions java/src/jni/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,9 @@ LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 100
LT_HL_F_VERS_REVISION = 7
LT_HL_F_VERS_AGE = 0
LT_JAVA_VERS_INTERFACE = 105
LT_JAVA_VERS_REVISION = 1
LT_JAVA_VERS_AGE = 5
LT_JAVA_VERS_INTERFACE = 106
LT_JAVA_VERS_REVISION = 0
LT_JAVA_VERS_AGE = 6
LT_TOOLS_VERS_INTERFACE = 102
LT_TOOLS_VERS_REVISION = 1
LT_TOOLS_VERS_AGE = 0
Expand All @@ -828,7 +828,7 @@ JAVA_API = yes
lib_LTLIBRARIES = libhdf5_java.la

# Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am)
libhdf5_java_la_LDFLAGS = -avoid-version -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS)
libhdf5_java_la_LDFLAGS = -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS)

# Source files for the library
libhdf5_java_la_SOURCES = exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \
Expand Down
6 changes: 3 additions & 3 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -959,9 +959,9 @@ LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 100
LT_HL_F_VERS_REVISION = 7
LT_HL_F_VERS_AGE = 0
LT_JAVA_VERS_INTERFACE = 105
LT_JAVA_VERS_REVISION = 1
LT_JAVA_VERS_AGE = 5
LT_JAVA_VERS_INTERFACE = 106
LT_JAVA_VERS_REVISION = 0
LT_JAVA_VERS_AGE = 6
LT_TOOLS_VERS_INTERFACE = 102
LT_TOOLS_VERS_REVISION = 1
LT_TOOLS_VERS_AGE = 0
Expand Down
1 change: 1 addition & 0 deletions tools/lib/h5tools_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ free_table(table_t *table)
HDfree(table->objs[u].objname);

HDfree(table->objs);
HDfree(table);
}

#ifdef H5DUMP_DEBUG
Expand Down
3 changes: 0 additions & 3 deletions tools/src/h5dump/h5dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,8 @@ table_list_free(void)

/* Free each table */
free_table(table_list.tables[u].group_table);
HDfree(table_list.tables[u].group_table);
free_table(table_list.tables[u].dset_table);
HDfree(table_list.tables[u].dset_table);
free_table(table_list.tables[u].type_table);
HDfree(table_list.tables[u].type_table);
}

/* Free the table list */
Expand Down

0 comments on commit 4feb378

Please sign in to comment.