Commit Graph

144 Commits

Author SHA1 Message Date
Quincey Koziol
2e4302818a [svn-r24864] Description:
Remove all traces of MPI-POSIX VFD and GPFS detection/code.

    Remove remaining traces of stream VFD.

    Remove testpar/t_posix_compliant test (it's not actually verifying anything).

    Clean up H5D__mpio_opt_possible() further.

    Moved environment variable that disables MPI collective operations into
MPI-IO VFD (instead of it being in src/H5S.c).

    A few other small code cleanups.

Tested on:
    Mac OSX/64 10.9.2 (amazon) w/parallel & serial
2014-03-21 18:02:24 -05:00
Larry Knox
06aa7b6641 [svn-r24285] Eliminate several "passing argument ... with different width due to prototype" warnings by casting constants to size_t where expected by string functions.
Tested on jam, koala,ostrich and platypus with h5committest.
2013-10-10 16:57:04 -05:00
Quincey Koziol
5b876c929f [svn-r24101] Description:
Clean up warnings, enable new compiler warning flag(s) and bring back
changes from Coverity branch:

r20813:
Remove the dead code as listed for coverity bug #1722. h5committested.

r20814:
Issue 69: Check return value and throw error if negative return. Also free datatype id on error

r20815:
Use HDstrncpy. --gh

r20816:
Replaced one last HDstrcat call with HDstrncat to resolve coverity issue 832.

r20817:
Use HDstrncpy and HDstrncat. --gh

r20818:
Purpose: Fix valgrind issues with h5jam

Description:
Modified h5jam to free strings strdup'd in parse_command_line before exit. Note
that they may still not be freed in case of error, due to the widespread use of
exit().

r20819:
Issue 80: change loop to use int as loop index.

r20820:
Maintenance: Fixed the bug found by coverity CID 788
There were two problems with this function:
    1) it tried to unnecessary free NULL pointer
    2) it tried to allocate c_name buffer that is done by H5Pget_class_name


Tested on:
    Mac OSX 10.8.4 (amazon) w/gcc 4.8.1, C++ & FORTRAN
    (too minor to require h5committest)
2013-09-05 15:44:14 -05:00
Quincey Koziol
453f95c192 [svn-r24011] Description:
Clean up a few warnings

Tested on:
    Mac OSX 10.8.4 (amazon) w/C++ & FORTRAN
    (too minor to require h5committest)
2013-08-15 08:24:28 -05:00
Allen Byrne
4e1695576c [svn-r23953] Update stream handling to allow binary mode - due to unjam fix.
Tested: local linux
2013-07-31 11:22:40 -05:00
Allen Byrne
ad7624ada3 [svn-r23944] Move stream functions into tools lib.
Tested: local linux
2013-07-30 12:04:23 -05:00
Quincey Koziol
d38fe20df6 [svn-r23695] Description:
Clean up warnings in H5Tconv.c (down to _only_ 9000 lines of output now!)

    Merge changes from Coverity branch back to trunk:

r20684:
Fix for coverity bug #1721 which was due to the fix for coverity bug #943.

r20685:
Use HDstrncpy. --gh

r20761:
Purpose: Fix valgrind issues

Description:
Free image_data and data as appropriate in test_image.

r20762:
Purpose: Fix coverity issue 600

Description:
Add check for return value of H5O_close in H5Ocopy.  Also cleaned up various
warnings.

r20763:
Purpose: Fix valgrind issues with h5stat

Description:
Modified h5stat to free "iter" before exit, and free "hand" before exit if
parse_command_line exits directly.

r20764:
fixed coverity issues:
69, 327, 614, 684, 685, 696, 697, 1681, 967, 826, 660, 80

r20765:
Fixed coverity bug 668

Pulled x * y * z multiply out of malloc operand into a separate n_elements variable to quiet integer overflow warning.

No actual integer overflow tests are performed since it's just a test program but I did add a check that n_elements is >= 1.

I also changed an error condition from doing its own close and returning -1 to "goto out;" like the rest of the program.

r20766:
Fixed coverity bug 667

Pulled x * y * z multiply out of malloc operand into a separate n_elements variable to quiet integer overflow warning.

No actual integer overflow tests are performed since it's just a test program.


Tested on:
    Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
    (h5committest upcoming)
2013-05-11 10:59:48 -05:00
Allen Byrne
c3e149d06f [svn-r23226] HDFFV-8285: suppress-ddl option: Changed file options to allow for filename F to be optional.
Tested: local linux
2013-02-04 15:15:59 -05:00
Quincey Koziol
a3e98d0e36 [svn-r23219] Description:
Bring reviewed changes from Coverity branch back to trunk (QK & JK):

r20457:
Coverity issue 691: return of H5duo could be negative. Fixed by using
STDOUT_FILENO and redesign parse_command_line and main to cleanup file
allocations. The output_file var is null when using stdout. In cleanup do not
close output_file if NULL.

r20510:
Initialize ufid = -1 and predicate HDclose call on ufid != -1

r20511:
Purpose: Fix coverity issue 1715

Description: Free "file" and nested data on failure in H5FD_core_open.

r20512:
Initialize ifid = -1 and predicate HDclose call on ifid != -1

r20514:
Initialize h5fid = -1 and predicate HDclose call on h5fid != -1

r20516:
Added else branch to the if (ret_value < 0) check.

r20522:
Addressed coverity issues 930-933, 850, 836, 835, 1307.  All minor 
potential buffer overwrite bugs, or coverity errors.  Fixed by replacing
strcpy and sprintf with strncpy and snprintf.

r20523:
fixed coverity issues 68, 1120, 1116i

r20524:
Check  H5Z_SZIP->encoder_present < 1 assuming 0 represents absence.

r20601:
Purpose: Fix coverity issues 1703-1705

Description: Modified the cleanup code in test_free in accum.c to reset
allocated buffers to NULL after they are freed, and modified the error cleanup
code to check if these buffers are NULL before freeing them.  Also fixed some
unrelated warnings in accum.c.

r20602:
Use HDsnprintf and HDstrncat

r20603:
Purpose: Fix coverity issues 808-809

Description: Modified test_core in vfd.c to check the returns from malloc, and
keep track of whether points and check are allocated by setting them to NULL
when they are not.  Added code to free points and check on error if they are
not NULL.  Also fixed unrelated warnings in vfd.c.

r20604:
Use HDstrncpy.

r20605:
Use HDstrncpy and HDstrncat.

r20606:
Purpose: Fix coverity issue 807

Description: Modified long_compact in stab.c to keep track of whether objname is
allocated by setting it to NULL when it is not.  Added code to free objname on
error if it is not NULL.

r20607:
Changed string function calls to use versions that specify the string length
to fix coverity issues 832 and 839.


Tested on:
    Mac OSX/64 10.8.2 (amazon)
    (Too minor to require h5committest)
2013-02-01 20:53:32 -05:00
Allen Byrne
415aa7e257 [svn-r23216] Add newline for special case of only raw data to stdout 2013-01-31 15:51:23 -05:00
Allen Byrne
ff421d9424 [svn-r23190] HDFFV-8285: Add suppress ddl option.
Tested: local linux
2013-01-22 15:43:12 -05:00
Allen Byrne
7a775b6c59 [svn-r23158] HDFFV-8169: h5dump incorrectly dumps a string into a binary file
Tested: local linux
2013-01-14 11:26:22 -05:00
Allen Byrne
28943c415b [svn-r22625] HDFFV-8111: h5diff compare file to itself - removed path shortcut 2012-08-03 15:11:36 -05:00
Allen Byrne
389e928176 [svn-r22604] cast void* to char* for calculation
Issue on windows
2012-07-26 08:32:12 -05:00
Allen Byrne
dd27fe612c [svn-r22602] 2012-07-25 17:17:48 -05:00
Allen Byrne
eb5b8163f9 [svn-r22411] reduce compiler warnings by removing unreferenced variables and adding cast
Tested: local linux
2012-05-25 12:39:07 -05:00
Allen Byrne
a51eaab41a [svn-r22087] Minor formatting changes to sync with 1.8 2012-03-19 09:03:12 -05:00
Quincey Koziol
46a289c796 [svn-r22061] Description:
Change to use versioned API call, to avoid problems when defaulting to
older AI versions.

Tested on:
    Mac OSX/64 10.7.3 (amazon) w/debug
2012-03-13 09:38:37 -05:00
Allen Byrne
bec199165a [svn-r22042] HDFFV-7957-7958:
Add tools error stack and check return from H5Dreference call.
Tested: CMake and h5committest
2012-03-12 11:33:15 -05:00
Allen Byrne
202c36682b [svn-r21985] Tools must call h5tools_init before command_line parsing or using tools_mesg functions.
Tools library uses alais variables for stdout, stderr and tools library uses HDfprintf() functions.

Tested: local linux
2012-02-24 16:14:47 -05:00
Allen Byrne
0b4463911f [svn-r21974] Update HSIZE_T print statements to use correct macro.
Fix some more HD prefix issues in tools.

Tested: local linux
2012-02-23 14:08:09 -05:00
Allen Byrne
108c788d37 [svn-r21971] Correct HD prefix 2012-02-22 17:23:08 -05:00
Allen Byrne
d59da45c98 [svn-r21969] Added missing HD prefix
Correct indentation
2012-02-22 16:58:50 -05:00
Allen Byrne
fb762aa6b0 [svn-r21953] HDDFV-7560: h5dump refactoring
Tested: local linux
2012-02-17 16:41:58 -05:00
Allen Byrne
5b03d4b08d [svn-r21952] HDFFV-5874: -c and -k subsetting
Tested:local linux
2012-02-17 15:14:03 -05:00
Raymond Lu
64b1807783 [svn-r21378] The tools used "%hhd" to print signed char. But VMS doesn't know it. So I used H5_VMS to have a different way ("%hd") to print it.
Tested on jam.  Not tested on VMS yet.  Simple change.
2011-09-13 10:45:34 -05:00
Quincey Koziol
a777619a6b [svn-r21121] Description:
Switch from H5P_DATASET_ACCESS_DEFAULT to H5P_DEFAULT for calls to
H5Rdereference2().

Tested on:
    Mac OS X/32 10.6.8 (amazon) w/debug
    (too minor to require h5committest)
2011-07-18 18:12:28 -05:00
Raymond Lu
304f19d730 [svn-r21117] Issue 2763 - I added a new parameter of object access property list to the function H5Rdereference. It's called H5Rdereference2 now. H5Rdereference function has been deprecated to H5Rdereference1. I also added some test cases in trefer.c.
Tested on jam, heiwa, and koala.
2011-07-18 16:23:02 -05:00
Allen Byrne
f49dc38127 [svn-r20796] Refactor print_data_region_blocks/ponts to remove context passed in by value. The print functions needed an independent context with only the current indent level passed in by argument. Also synched the two routines logical flows and corrected a mem_space error.
h5dump (and h5stat, h5jam/h5unjam) help option not tested. Added h5dump parse_command_line technique for h5stat and h5jam/unjam and created testfiles.

Tested: local linux
2011-05-11 15:45:54 -05:00
Allen Byrne
2e7d42a43c [svn-r20785] Revert region data print changes from yesterday 2011-05-10 08:52:13 -05:00
Allen Byrne
3b06122b50 [svn-r20783] correct type of variable for blkindx 2011-05-09 16:50:35 -05:00
Allen Byrne
8e30e8da7b [svn-r20781] correct typo of variable types for indx and jndx 2011-05-09 16:36:34 -05:00
Allen Byrne
a4c349dece [svn-r20776] Refactor print_data_region_blocks/ponts to remove context passed in by value. The print functions needed an independent context with only the current indent level passed in by argument. Also synched the two routines logical flows and corrected a mem_space error.
Tested: local linux
2011-05-09 14:56:32 -05:00
Allen Byrne
c5e00232ff [svn-r20725] Add overlooked changes from part of coverity fix
Tested: local linux
2011-05-04 15:28:09 -05:00
Allen Byrne
907a5a1df0 [svn-r20713] Packed Bits Merge:
removed option defines and #ifdef/#endif
   refactored all printf to HDfprintf in h5dump.c
   formatted and indention improvements
   synched with 1.8 branch
   
Tested: local linux
2011-05-03 12:56:23 -05:00
Allen Byrne
87994982f9 [svn-r20677] Merge packed bits option from 1.8 branch to trunk. CMake only. Autotools merge to come.
Tested: local Linux
2011-04-29 13:38:41 -05:00
Jonathan Kim
170e7e53a5 [svn-r20676] Purpose:
- HDFFV-5928 - GMQS: h5diff problem and improvement on comparsing the same objects

Description:
    Fixed:
    1) adding h5tools_is_obj_same() function to check if two given IDs or paths point to the same object. This function can be very useful for other tools and applications.
    2) using h5tools_is_obj_same() at h5diff() and diff() in h5diff.c. If two paths point to the same object, there is no need to check the details of the object since we know there is no difference. The fix will increase the performance by skipping the content comparison. It also fixed the problem of reporting difference for some cases of comparing the same file, e.g. empty files or files with incomparable objects the same file.

    Test update:
    Updat prvious test cases (171, 172, 530) affected by this fix, so they
    still perfrom originally intended testing without bypassing.

Tested:
 jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), cmake
2011-04-29 12:02:31 -05:00
Raymond Lu
65794c39bf [svn-r20626] Albert's test on bp reveals that the dumper had assertion failure when it tried to display empty attribute data. I added
a check for empty attribute in h5dump.c. I also added a check for empty dataset in tools/lib/h5tools.c.

Tested on jam.  But I tested the same changes in 1.8 on jam, linew, and amani.
2011-04-25 11:59:51 -05:00
Quincey Koziol
53eb528071 [svn-r20539] Description:
Bring Coverity changes back to trunk:

r20276:
Add recursive is vlen string function.
Cleanup resource leaks for issues: 200,202,329,688,811,812


r20277:
Check types and close by adding error section: issue 687


r20278:
Replaced implicit pointer conversion with (ocrt_info.new_obj != NULL).


r20280:
Addressed coverity issues 927-929 & 583.  The real issue is failure to check 
file name length -- at least at the H5FD interface level.  This needs more work, but at least I have dealt with the issue in H5FDfamily.c


r20337:
H5O_type_t  obj_type = H5O_TYPE_UNKNOWN;


r20338:
Added udata.name = NULL; to prevent potential uninitialized use after done: label.


r20339:
coverity issues: 686,828,1670-1673,1707-1711


Tested on:
        FreeBSD/32 6.3 (duty) in debug mode
        FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
        FreeBSD/32 8.2 (loyalty) w/gcc4.6, in debug mode
        FreeBSD/64 8.2 (freedom) w/gcc4.6, in debug mode
        Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
                w/C++ & FORTRAN, w/threadsafe, in debug mode
        Linux/64-amd64 2.6 (amani) w/Intel compilers, 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, w/threadsafe, in production mode
        Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
        Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
2011-04-18 05:18:47 -05:00
Quincey Koziol
e4c6ef2f06 [svn-r20480] Description:
Remove global variable for the path name in the group traversal code.  Also
clean up a bunch of compiler warnings.

Tested on:
    Mac OS X/32 10.6.7 (amazon) w/debug & production
    FreeBSD/32 6.3 (duty) w/debug
    FreeBSD/64 6.3 (liberty) w/debug
    Solaris/32 2.7 (linew) w/debug
2011-04-12 11:59:33 -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
Allen Byrne
5ed4eda59e [svn-r20247] Change name of new VLEN function from H5Tdetect_vlen_str to h5tools_detect_vlen_str to match other functions in tools lib.
Added back test for H5Tdetect_class of H5T_VLEN after each instance of above function to catch all VLEN types in h5dump.

Tested: local linux
2011-03-14 16:03:20 -05:00
Allen Byrne
1eedd5b750 [svn-r20222] Correct mistake by declaring indexing variable removed from for at top of function. 2011-03-10 08:27:29 -05:00
Allen Byrne
55cd5326f3 [svn-r20221] Remove rougue 'int' inside for loop (cut-paste error) - windows complained. 2011-03-10 07:10:36 -05:00
Allen Byrne
5b3223c7c5 [svn-r20216] Valgrind fix for memory leak in h5tools_dump_xxx which is fixed by adding a new function;
htri_t H5Tdetect_vlen_str(hid_t tid) to h5tools. This needs to be called before any H5Aread/H5Dread and if TRUE, then call vlen_reclaim function after the corresponding h5tools_dump_xxx().

Tested: local linux and valgrind
2011-03-09 15:00:20 -05:00
Peter Cao
a56b49aaba [svn-r20206] Updated manifest and source code for fixing h5dump -y -o problem 2011-03-09 08:07:38 -05:00
Jonathan Kim
bb294c2b1e [svn-r20108] Purpose:
Fixing Bug 2092 - h5dump does not display index for a dataset

Description:
    h5dump skip displaying array indices every certain number when the 
    array type dataset is relatively big. The certain number varies 
    according to the size of each array. 
    This checkin fix the skipping array indices problem. This fix also
    correct indentation of the dataset data output.
     
Tested:
 jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE)
2011-02-15 14:28:48 -05:00
Allen Byrne
f3c2eb9acf [svn-r19918] Add hh modifier to signed char printf format string. Added h5dump test to verify that signed/unsigned datasets print correctly.
Bring solution from 1.8 packed bits fix which solved problem on heiwa with Signed char of 8 bits
Tested: local linux
2011-01-05 15:18:16 -05:00
Quincey Koziol
ba66540462 [svn-r19654] Description:
Bring Coverity revisions from branch back to trunk, and clean up some other
misc. compiler warnings also.

r19500:
Fix coverity items 1446 and 1447.  Moved up calls to memset in test_cont in
ohdr.c so the test never tries to close uninitialized locations.

r19501:
Fix coverity items 1398-1445.  Various uninitialized variable errors in fheap.c.

r19502:
Fixed coverity issue 579 and some additional warnings in the file as well.

r19503:
Bug fix: This fix addressed the "RESOURCE_LEAK" problems #789 and 790, run 26

r19504:
minor mods to try to keep coverity from flagging false positives.

r19505:
Fixed coverity issues 566 - 571.  Declared variables that are passed to functions that use them as arrays to be arrays of size 1.


Tested on:
    Mac OS X/32 10.6.4 (amazon) w/debug, production & parallel
    (h5committested on trunk)
2010-10-21 08:08:44 -05:00