Commit Graph

73 Commits

Author SHA1 Message Date
Allen Byrne
a5789f6c9a HDFFV-8745 fix minor defects 2018-01-09 16:26:25 -06:00
Allen Byrne
5f4676f3c8 HDFFV-8745 - fix implementation of 8625 2018-01-02 14:39:45 -06:00
Allen Byrne
78a5870680 Fix error handling issues 2017-10-17 16:13:12 -05:00
Allen Byrne
2cbdf46cb9 HDFFV-10297 add h5copy test and fix h5diff errors 2017-10-16 17:26:23 -05:00
Allen Byrne
e0bbff9d46 Fix VS2012 declaration error 2017-10-16 10:56:54 -05:00
Allen Byrne
d5c073d406 HDFFV-10296 Update tools lib to use the error handling macros. 2017-10-13 16:34:01 -05:00
Allen Byrne
daddf169b0 HDFFV-10297 - Fix test errors - five remaining 2017-10-09 12:59:28 -05:00
Allen Byrne
973aebe25f Add debug trace commands 2017-05-19 11:35:07 -05:00
Allen Byrne
445c805a4c HDFFV-10186 Add endianess to bitfield and fix tests 2017-05-10 10:59:13 -05:00
Larry Knox
89fbe00dec Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to hdf5_1_10
* commit '54957d37f5aa73912763dbb6e308555e863c43f4':
  Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes.
  Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh.
  Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1
  Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
2017-04-25 16:05:36 -05:00
Quincey Koziol
bb6cb6adb0 Code style and warning cleanups, from revise_chunks branch. 2016-11-06 12:08:19 -08:00
Allen Byrne
1494413413 [svn-r30236] HDFFV-9928: remove duplicate and unconditional includes in h5diff_array.
Also format function block in h5diff_attr to eliminate excessive whitespace
2016-08-01 12:26:41 -05:00
Quincey Koziol
d3396a7953 [svn-r30075] Description:
Bring object/dataset/group/named datatype features from revise_chunks
branch to trunk.  Also CMake support for h5format_convert and a bunch of
misc. cleanups.

Tested on:
    MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
    (h5committest forthcoming)
2016-06-14 18:07:03 -05:00
Allen Byrne
3764d69e9e [svn-r29885] Fix memory leak when one dataset is vlen. 2016-05-04 11:39:28 -05:00
Quincey Koziol
cd49e8a2ab [svn-r28025] Description:
Switch 'int' flag variables to booleans.

Tested on:
    MacOSX/64 10.10.5 (amazon) w/serial & paralel
    (too minor for h5committest)
2015-10-10 21:42:20 -05:00
Albert Cheng
3dc1e6dd38 [svn-r25081] Bug HDFFV-8625, HDFFV-8639, HDFFV-8745:
h5diff issues "unable to read attribute" error message when comparing two files

Description:
    h5diff did not handle attributes of variable length strings correctly. It created the wrong memory type if one but not both compared attributes are of the variable strings type. It ended in H5Aread() failure.

Solution:
    We decided to treat the case when one type is variable length string and the other is not as incomparable. That bypassed the above error.  We still need to figure out the proper way, if possible, to compare variable string with non-variable string types.

Tested: h5committested plus tested in Swallow (OS X 10.8).
2014-04-22 17:25:51 -05:00
Albert Cheng
9734210966 [svn-r24999] Bugfix: HDFFV-8639
h5diff segfaults with user's files

Solution:
Added a variable to indicate if real data are in the buffer and will call H5Dvlen_reclaim()
only when real data are in the buffer.

Tested: with the user provided data files and no more segmentaion fault.
Also h5committ tested.
2014-04-09 06:23:16 -05:00
Allen Byrne
a8c63e28d5 [svn-r24138] Cast constants to specified type.
Cast smaller vars to larger type.
Cast calculation result to correct type.
Changed int member to hbool_t

Tested: local linux
2013-09-13 16:11:30 -05:00
Quincey Koziol
59dd5665a5 [svn-r23395] Description:
Bring Coverity changes from branch to trunk:

r20682:
fixed coverity:
76, 77, 635, 636, 1164, 1165, 1166, 1121, 1122, 1117, 1343

Tested on:
    Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
    (too minor to require h5committest)
2013-03-19 22:44:28 -05:00
Jonathan Kim
dbad502865 [svn-r23304] Purpose:
HDFFV-7643 - h5diff - incorrect exit-code returns for extra attribute exist

Description:
   h5diff: Fixed to return correct exit code 1 when detect unique
   attribute. Prior to this fix, h5diff returned exit code 0 indicating 
   two files are identical.

Tested: 
    jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), fred (mac64-LE), emu (solaris-BE),  Windows (32-LE cmake), cmake (jam)
2013-02-18 14:46:03 -05:00
Jonathan Kim
961a24ac3c [svn-r22933] Purpose:
HDFFV-8145 h5diff slowness with version >= 1.8.7

Description:
    Improved speed when comparing HDF5 files with lots of attributes. Much slower performance was identified with release version from 1.8.7 to 1.8.10 compared to 1.8.6.
    
Tested: 
    jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), Windows (32-LE cmake), cmake (jam)
2012-10-19 16:28:14 -05:00
Jonathan Kim
231fc4d781 [svn-r22684] Purpose:
Address HDFFV-7942 - h5diff: incorrect result for comparing attribute data with different type size in same class

Description:
   When comparing attribute data values with same type class but different size, the result was incorrect.  It was due to the size difference and got truncated. 
   Fixed to match up the smaller type size to big type size like what dataset does.

  
Tested: 
 jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Windows (32-LE cmake), cmake (jam)
2012-08-15 11:04:26 -05:00
Jonathan Kim
e54d15a26c [svn-r21658] Purpose:
HDFFV-7770 - h5diff segmentation fault on JPSS files

Description:
    Fixed segfault over non-comparable attribute with different dimention or
    rank, along with '-c' option to display details.

Tested:
 jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Windows, Cmake
2011-10-24 16:50:13 -05:00
Jonathan Kim
86faf0b302 [svn-r21396] Purpose:
HDFFV-7693 - h5diff produces different behavior between versions: 1.8.3 and 1.8.6

Description:
    There were two issues on this. 
    One was not displaying all the comparable objects if non-comparable 
    object/attribute exist and compared before comparables ones. This issue
    occurred after 1.8.4 release. This is the issue from user.
    The other issue was not displaying all the comparable attributes, 
    if non-comparable object/attribute exist and compared ahead. This issue 
    were exist even before 1.8.4 release. So it's possible some attribute 
    comparison may have not displayed correctly in the past, if non-comparable 
    data were exist in common object.
    Fixed h5diff to display all the comparable object and attribute regardless 
    of non-comparables. 

Tested:
 jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake (jam, Windows)
2011-09-16 14:29:03 -05:00
Jonathan Kim
4147de8d02 [svn-r20294] Purpose:
Fixed CHICAGO: Bug 2121 - h5diff - incorrect and lack of output for the 
    different set of attributes (different number and names)

Description:
    Previously h5diff compared attributes correctly only when two objects have 
    the same number of attributes and attribute names are identical.
    This fix covers all other cases.
    Also didn't display useful information about attribute difference.
    This fixes both issues.

     
Tested:
 jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE)
2011-03-22 10:47:07 -05:00
Jonathan Kim
f92d2371ff [svn-r20285] Purpose:
Improve the previous fix for Bug 2216 - GMQS: h5diff - memory leak when 
    compares vlen string in dataset or attributes

Description:
    Related to the previous checkin r20270 and r20266.
    Improve h5tools_detect_vlen() code for better performance. H5Tdetect_class
    already recusive on given type so don't need to be part of recusive call
    again. Also improve error handlings in h5tools_detect_vlen and 
    h5tools_detect_vlen_str functions.
    Also updated h5ls and h5dump code accordingly.

     
Tested:
 jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake - jam
2011-03-21 18:02:31 -05:00
Jonathan Kim
d697acbfb5 [svn-r20270] Purpose:
Improve the previous fix for Bug 2216 - GMQS: h5diff - memory leak when 
    compares vlen string in dataset or attributes

Description:
    Improve the fix along with the previous checkin r20266.
    Add a new function to tool lib, h5tools_detect_vlen_data() which return 
    TRUE if include any kind of vlen data all at once, either VLEN-data or 
    VLEN-string and so on.
    Also updated h5ls and h5dump code accordingly.

     
Tested:
 jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake - jam
2011-03-18 13:50:19 -05:00
Jonathan Kim
e8d97aef7d [svn-r20266] Purpose:
Fixed Bug 2216 - GMQS: h5diff - memory leak when compares vlen string in 
    dataset or attributes

Description:
    Test for dataset : valgrind  --leak-check=full  ./h5diff -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/VLstring
    Test for attr : valgrind --leak-check=full ./h5diff h5diff_attr1.h5 h5diff_attr2.h5
    Both test cases are in testing script.

     
Tested:
 jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake - jam
2011-03-17 18:00:14 -05:00
Quincey Koziol
575469a6a7 [svn-r20065] Description:
Bring changes from Coverity branch to trunk:

r19975:
Fixed potential mem leak at H5O_attr_open_by_name

r19980:
Fix coverity issue 792.
Free tmp_env_prefix in H5Lexternal.c line 365 if it is not NULL but its contents are 0 when it goes out of scope.

r20039:
Eliminate warnings about nested extern and implicit declarations of parallel_print and address Coverity defects 712-781 by #including h5tools_utils.h in h5diff_array.c, h5diff_attr.c, h5diff_dset.c and h5diff_util.c.

r20046:
Purpose: Address TOCTOU warnings in h5jam and h5unjam

Description: Coverity is afraid that the state of the input file could change
between the call to stat() and the call to open().  This is called a time-of-
check time-of-use (TOCTOU) vulnerability.  Modified stat calls to fstat which
uses an open file pointer so it (hopefully) won't complain any more.

r20047:
Addressed coverity issues 135-137, 462-464.  Local pointers that needed to be freed in case of error were moved out of a switch statement in src/H5Tnative.c, set to NULL, and checked before freeing.

Tested on:
    Mac OS X/32 10.6.6 (amazon) w/debug & production
    (h5committested on Coverity branch)
2011-02-08 16:35:54 -05:00
Quincey Koziol
a6d5fa2c7d [svn-r20061] Description:
Bring changes from Coverity branch to trunk:

r19930:
Fix memory leaks involving VL attributes in h5repack and h5diff.  The buffers in
copy_attr and diff_attr were not checked for the presence of a vlen before being
freed, and vlen storage was never reclaimed.  Added checks and calls to
H5D_vlen_reclaim().

r19933:
Purpose: Fix memory leak in H5L_move_cb()

Description: H5L_move_cb copied the source link using H5O_msg_copy() but freed
it manually using H5MM_xfree().  Since H5O_link_copy allocates the link using
H5FL_MALLOC, this causes the link to be allocated from the free list but is
never put back on the free list when it is freed.  This prevents the link free
list from shutting down properly.  Modified H5L_move_cb() and H5L_move_dest_cb()
to free the link properly using H5O_msg_free().

r19973:
Fix resource leaks by freeing string created by HD5f2string

r19974:
Issue #345: Inialize buf variable to null

Tested on:
    Mac OS X/32 10.6.6 (amazon) w/debug & production
    (h5committested on Coverity branch)
2011-02-07 19:53:45 -05:00
Jonathan Kim
3c5dc1a808 [svn-r18134] Purpose:
Additional fix relted to the fix of bug1672.

Description:
    The fix of bug1672 caused some changes of output which required modifying
    some test cases.  After some discussion, restoring the changes of the test 
    cases was decided.  After many experiments for the solution, this fix was 
    made so the code which improved performance can stay.

Tested on Jam.
2010-01-21 15:01:42 -05:00
Jonathan Kim
77b493eea3 [svn-r17938] Purpose:
Fix potential problem similar to Bug1672 (getting garbage values)

Description:
    This will resolve the potential problem like Bug1672 when comparing 
    attributes. It improves the performance by not calling diff_array 
    twice. (diffing time in half). Little clean up on comment lines.
    Refer to the Bug fix 1672. (also svn revision 17905 on trunk) 
	
Tested on:
    linux32 (jam) , linux64 (almani), solaris (linew)
2009-11-30 16:25:41 -05:00
Pedro Vicente Nunes
96a0892ba8 [svn-r16461] Bug fix: for compound types, the not comparable test for members was not done
Solution: for compound types, recursively apply that check
Two new cases are added
1) the compound type has a different number of members. Message printed is
<obj1> has X members <obj2> has Y members
Where X and Y are the number of members of each compound type being compared
2) the compound type has not comparable types (for example a double and an int at the same index)
In this case the message
Comparison not possible: object1 is of class1 and object2 is of class2
Is replaced with
Comparison not possible: object1 has a  class1 and object2 has a  class2
Modified the test generator program to have these 2  cases
Added a shell run for these 2  cases


Tested: windows, h5committest
2009-02-11 10:57:25 -05:00
Pedro Vicente Nunes
9a298fd1dd [svn-r16373] replaced some printf statements with parallel_print
tested: linux serial and parallel
2009-01-29 13:58:36 -05:00
Pedro Vicente Nunes
120350c395 [svn-r16348] #1368 (E1) h5diff: implement "not comparable" messages. Implemented RFC. The new option is <-c, --compare List objects that are not comparable>
added some test cases

tested: windows, linux
2009-01-26 14:29:22 -05:00
Quincey Koziol
bdd7d59902 [svn-r15628] Description:
Remove trailing whitespace from C/C++ source files, with the following
script:

    foreach f (*.[ch] *.cpp)
        sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
    end

Tested on:
    Mac OS X/32 10.5.5 (amazon)
    No need for h5committest, just whitespace changes...
2008-09-16 10:52:51 -05:00
Pedro Vicente Nunes
5f7de91688 [svn-r15509] bug fix
when comparing attributes, a type ID was not properly closed 

solution: close the Id on the iteration and continue instead of goto out of the cycle
2008-08-21 14:15:05 -05:00
Pedro Vicente Nunes
3c4b177198 [svn-r14279] bug fix: when it's not possible to compare attributes due to different lenght in its type, make the options be flaged with the "not comparable" flag
tested: windows, linux
2007-11-21 11:59:04 -05:00
Pedro Vicente Nunes
0cdd1ec176 [svn-r14276] bug fix: avoid an assertion when string type sizes are different
instead print a warning message on verbose mode saying that the comparison is not possible

note: partial fix, the next step is to compare strings that have different type sizes

tested: windows
2007-11-20 15:39:39 -05:00
Quincey Koziol
e15bdb05e6 [svn-r14225] Description:
Change H5Oget_info -> H5Oget_info_by_name and re-add H5Oget_info in a
simpler form for querying a particular object, to align with other new API
routines.

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-31 08:13:40 -05:00
Quincey Koziol
dbff4af21c [svn-r14217] Description:
Change H5Aopen -> H5Aopen_by_name, in order to be more consistent with
other new API routines.

	Re-add H5Aopen as a simpler routine, to open attributes on a particular
object.  (Much like the old H5Aopen_name routine).

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-30 11:07:20 -05:00
Quincey Koziol
16683943c6 [svn-r14193] Description:
Make H5Dopen versioned and change all internal usage to use H5Dopen2

	Add simple regression test for H5Dopen1

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-08 14:59:36 -05:00
Quincey Koziol
bb3afd50c2 [svn-r14185] Description:
Move H5Aopen_name() routine to deprecated symbol section and replace
internal usage with H5Aopen().

	Add simple regression test for H5Aopen_name() to deprecated routine
test.

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-04 14:29:58 -05:00
Quincey Koziol
3db40827da [svn-r14184] Description:
Move H5Aopen_idx() into deprecated symbols section, replacing all
internal usage with H5Aopen_by_idx().

	Add simple regression test for H5Aopen_idx().

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-04 13:32:47 -05:00
Quincey Koziol
d4eec753a1 [svn-r14183] Description:
Move H5Aget_num_attrs() into deprecated routines section, replacing all
internal usage with H5Oget_info().

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-10-04 12:36:17 -05:00
Quincey Koziol
2c93a80648 [svn-r14160] Description:
Make H5Topen versioned, and add regression test for H5Topen1.

Tested on:
        FreeBSD/32 6.2 (duty) in debug mode
        FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
        Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
                                in production mode
        Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
                                w/szip filter, in production mode
        AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode
        Mac OS X/32 10.4.10 (amazon) in debug mode
2007-09-27 15:28:27 -05:00
Quincey Koziol
ea343ef854 [svn-r14115] Description:
Remove all plain calls to H5Gopen() from source, replacing them with
either H5Gopen2().

	Add test for H5Gopen1().

	Reformatted several pieces of code, to clean them up.

Tested on:
	FreeBSD/32 6.2 (duty)
	FreeBSD/64 6.2 (liberty)
	Linux/32 2.6 (kagiso)
	Linux/64 2.6 (smirom)
	Solaris/32 5.10 (linew)
	Mac OS X/32 10.4.10 (amazon)
2007-08-28 10:02:54 -05:00
Pedro Vicente Nunes
bd01f34589 [svn-r13451]
h5diff bug fix, attributes differences were not being count for total
differences

Revision of H5Ocopy call in h5repack
2007-03-05 11:26:50 -05:00
Pedro Vicente Nunes
a0d5e09775 [svn-r13441]
make 1.7 h5repack more similar to 1.6 h5repack
2007-03-01 16:36:43 -05:00
Pedro Vicente Nunes
5af701a32e [svn-r13334] Added a new function to print the dimensions sizes 2007-02-19 15:21:09 -05:00