Commit Graph

470 Commits

Author SHA1 Message Date
Jonathan Kim
bea08cb3a8 [svn-r19760] Purpose:
Fix compile error for Windows from previous checkin r19758.

Description:
    Previous log:
    Improve h5diff performance.
    The following changes for improving h5diff performance:
    1) use HDmemcmp() before comparing each elements 
       (memcmp() is very fast at both linew and jam)
    2) replace the expensive H5Tequals() calls
    3) retrieve datatype information at dataset level not each element level 
       for compound datasets


Tested:
 jam (linux32-LE), Windows
2010-11-11 11:55:51 -05:00
Jonathan Kim
b82c6a4f62 [svn-r19758] Purpose:
Improve h5diff performance.

Description:
    The following changes for improving h5diff performance:
    1) use HDmemcmp() before comparing each elements 
       (memcmp() is very fast at both linew and jam)
    2) replace the expensive H5Tequals() calls
    3) retrieve datatype information at dataset level not each element level 
       for compound datasets
    Merged from hdf5 trunk r19757.


Tested:
 jam (linux32-LE)
2010-11-11 10:31:11 -05:00
Jonathan Kim
13c16c8982 [svn-r19713] Purpose:
Fixed h5diff to handle variable-length strings in a compound dataset 
    correctly. Also variable-length string array in a compound dataset.
    Bug #1989.
    

Description:
    Garbage values were displayed when h5diff compared variable-length 
    strings (or string array) in a compound type dataset. 
    Merged from hdf5 trunk r19712.


Tested:
 jam (linux32-LE), heiwa (linuxppc64-BE)
2010-11-02 11:57:16 -05:00
Quincey Koziol
d1117ac78c [svn-r19655] Description:
Bring r19654 from trunk to 1.8 branch:

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 coverity branch)
2010-10-21 09:08:13 -05:00
Jonathan Kim
322a384b13 [svn-r19444] Purpose:
Fix for group comparison with exclude-path case. Use relative path.

Description:
 Merge from hdf5 trunk (r19443)
 Related to "1890:  h5diff excluding object for file comparison via command line" checkins. (r19407)

Tested:
 jam, amani
2010-09-20 17:20:13 -05:00
Allen Byrne
7c7b4e3deb [svn-r19438] Correct use of lib, include, bin in INSTALL commands to use proper variables.
Tested: local linux
2010-09-20 16:02:26 -05:00
Allen Byrne
36003ca79c [svn-r19419] On windows, an include bypassed the WIN32_LEAN_AND_MEAN define. Moved the define up. Moved the h5dif.h to after the h5private include
Tested: Windows
2010-09-17 13:06:49 -05:00
Larry Knox
696675029e [svn-r19408] In this revision the '/' after ${DESTDIR} wherever it occurs
has been removed. According to the official description of DESTDIR by Gnu at
http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
prepended to the normal and complete install path that it precedes for the
purpose of installing in a temporary directory which is useful for building
rpms and other packages.  The '/' after ${DESTDIR} will be followed by another
'/' at the beginning of the normal install path.  When DESTDIR is empty the
path then begins with '//', which is incorrect and causes problems at least for
Cygwin.

The change made in config/commence.am affects many Makefile.*s when bin/reconfigure
is run.  EXAMPLEDIRs had to be corrected individually.

Also the scripts to run examples after they are installed have checks added to see 
that the fortran and c++ directories are present before trying to run the scripts 
in them.

Tested with h5committest on amani, heiwa and jam.
2010-09-16 17:12:07 -05:00
Jonathan Kim
6d97ffcc6c [svn-r19407] Purpose:
Add --exclude-path option

Description:
 Merged from hdf5 trunk (r19406).
 Specified path to an object will be excluded from comparing the two files or two groups. If group is specified all the member objects will be excluded.
Related to "1890:  h5diff excluding object for file comparison via command line"

Tested:
 jam, amani
2010-09-16 16:57:27 -05:00
Jonathan Kim
a9a3f22e78 [svn-r19401] Purpose:
Fix for Bug1975 h5diff - support recursive comparison on group when specified as an object

Description:
 Merged from hdf5 trunk (r19400).
 Compare member objects and groups recursively when two files or groups are specified to be compared. Support parallel diff and handling symbolic links accordingly.

Tested:
 jam, amani
2010-09-16 13:09:59 -05:00
Larry Knox
23bc2c0b38 [svn-r19371] Updated autoconf to version 2.6.7, libtool to version 2.2.10, and m4 to version 1.4.14. Also added m4 directory for m4 macros according to autoconf suggestion.
Tested with h5committest on amani, jam, and heiwa, and on linew.

-This line, and those below, will be ignored--

M    hdf5_1_8/test/Makefile.in
A    hdf5_1_8/m4
AM   hdf5_1_8/m4/ltsugar.m4
AM   hdf5_1_8/m4/libtool.m4
AM   hdf5_1_8/m4/ltversion.m4
AM   hdf5_1_8/m4/lt~obsolete.m4
AM   hdf5_1_8/m4/ltoptions.m4
M    hdf5_1_8/configure
M    hdf5_1_8/Makefile.in
M    hdf5_1_8/testpar/Makefile.in
M    hdf5_1_8/configure.in
M    hdf5_1_8/src/Makefile.in
M    hdf5_1_8/tools/Makefile.in
M    hdf5_1_8/tools/misc/Makefile.in
M    hdf5_1_8/tools/h5dump/Makefile.in
M    hdf5_1_8/tools/h5repack/Makefile.in
M    hdf5_1_8/tools/h5jam/Makefile.in
M    hdf5_1_8/tools/h5diff/Makefile.in
M    hdf5_1_8/tools/lib/Makefile.in
M    hdf5_1_8/tools/h5copy/Makefile.in
M    hdf5_1_8/tools/h5import/Makefile.in
M    hdf5_1_8/tools/h5stat/Makefile.in
M    hdf5_1_8/tools/h5ls/Makefile.in
M    hdf5_1_8/hl/test/Makefile.in
M    hdf5_1_8/hl/tools/Makefile.in
M    hdf5_1_8/hl/tools/gif2h5/Makefile.in
M    hdf5_1_8/hl/Makefile.in
M    hdf5_1_8/hl/src/Makefile.in
M    hdf5_1_8/hl/c++/test/Makefile.in
M    hdf5_1_8/hl/c++/Makefile.in
M    hdf5_1_8/hl/c++/src/Makefile.in
M    hdf5_1_8/hl/c++/examples/Makefile.in
M    hdf5_1_8/hl/fortran/test/Makefile.in
M    hdf5_1_8/hl/fortran/Makefile.in
M    hdf5_1_8/hl/fortran/src/Makefile.in
M    hdf5_1_8/hl/fortran/examples/Makefile.in
M    hdf5_1_8/hl/examples/Makefile.in
M    hdf5_1_8/config/commence.am
M    hdf5_1_8/MANIFEST
M    hdf5_1_8/c++/test/Makefile.in
M    hdf5_1_8/c++/Makefile.in
M    hdf5_1_8/c++/src/Makefile.in
M    hdf5_1_8/c++/examples/Makefile.in
M    hdf5_1_8/bin/ltmain.sh
M    hdf5_1_8/bin/reconfigure
M    hdf5_1_8/perform/Makefile.in
M    hdf5_1_8/fortran/test/Makefile.in
M    hdf5_1_8/fortran/testpar/Makefile.in
M    hdf5_1_8/fortran/Makefile.in
M    hdf5_1_8/fortran/src/Makefile.in
M    hdf5_1_8/fortran/examples/Makefile.in
M    hdf5_1_8/aclocal.m4
M    hdf5_1_8/examples/Makefile.in
2010-09-10 17:41:44 -05:00
Allen Byrne
c9cf76d5f9 [svn-r19326] Added parallel build commands.
Corrected use/name of source folder aliases.
Duplicated FindMPI.cmake so that non-c++ compiler is found first (recommemded commands did not work).
Bring r19325 from trunk

Tested: local linux with mpich
2010-08-31 15:20:12 -05:00
Allen Byrne
6cea4f52ce [svn-r19301] BZ 1958: Add h5dump xml tests to CMake support
Bring r19300 from trunk

Tetsed: local linux
2010-08-25 17:35:26 -05:00
Quincey Koziol
02a65c4685 [svn-r19291] Description:
Avoid getting object information for soft/external links if we aren't
going to traverse across the link itself.

Tested on:
    Linux/64 2.6 (chicago) w/debug & production
    (h5committest coming up)
2010-08-24 14:57:38 -05:00
Allen Byrne
82799772ad [svn-r19263] Undo r19258 2010-08-20 10:48:42 -05:00
Allen Byrne
fc975cffa2 [svn-r19258] Remove unused variables and allocation
Tested: local linux
2010-08-20 10:18:41 -05:00
Quincey Koziol
525caddd9e [svn-r19254] Description:
Bring r19252 & 19253 from trunk to 1.8 branch:

   Bring Coverity changes from branch to trunk:


r19161:
Fixed the part for matching the subset info with dataset

r19189:
BZ1646: h5dump does not check number of dimensions for subsetting parameters against the dataset

Changed subset_t structure from holding hsize_t pointers to holding new subset_d pointers, which hold the original hsize_t pointer + len. this len is then checked against dataset ndims in the handle_dataset function of h5dump.

Changed all references to use new data structure.

Added tests for each subset parameter.

r19190:
Added new h5dump ddl files

Tested on:
    Mac OS X/32 10.6.4 (amazon) w/debug & production
    (h5committested on Coverity branch)
2010-08-19 16:16:28 -05:00
Quincey Koziol
d9af3b4fdf [svn-r19238] Description:
Bring r19237 from trunk to 1.8 branch:

	Clean up misc. compiler warnings.

Tested on:
        FreeBSD/32 6.3 (duty) in debug mode
        Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
                in production mode
        Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
2010-08-12 16:27:02 -05:00
Allen Byrne
02b5824f57 [svn-r19198] [BZ1953]implementation for the proposed changes suggested by the "h5dump_output_option" RFC. This required that the region reference code be duplicated and reduced to allow the do_bin_output() function to understand region references. The container type-id also needed to be propagated into the do_bin_output() function and functions referenced (render_bin_output*).
Existing tests tested the binary function, so only one test was added to test the region reference generated file.
Tested: local linux
2010-08-09 12:15:06 -05:00
Allen Byrne
ab1051e0b0 [svn-r19184] Corrected h5repack verbose test for windows
Updated tools/lib source dir variable for source list

Tested: local linux
2010-08-06 13:06:30 -05:00
Quincey Koziol
6e3ff79f0c [svn-r19154] Description:
Bring r19153 from trunk to 1.8 branch:

    Bring changes on Coverity branch back to trunk:

r19040:
Fixed coverity #440 - NULL check after dereference.  We moved the NULL check up
into the IF block and changed it to assertion.

r19041:
Maintenance: Addressed Coverity issues 441 and 449 by initializing proper
variables

r19042:
In function H5O_chunk_protect (H5Ochunk.c):
 - Initialize H5O_chunk_proxy_t pointers chk_proxy and ret_value.
 - Free chk_proxy on error.

r19043:
Addressed coverity issues 442 - 448 by initializing pointers to NULL.

Tested on:
    Mac OS X/32 10.6.4 (amazon) w/debug & production
    (Too minor to require h5committest)
2010-07-29 14:17:29 -05:00
Jonathan Kim
435f58c1b8 [svn-r19053] Purpose:
Add --no-dangling-links option to h5ls. 

Description:
Related to "Bug 1830 - Following an dangling external link in h5ls should set non-zero return code."
If --no-dangling-links option is specified and any dangling link is found, return exit code 1 (error).
Merged from hdf5 trunk r19051

Tested:
 jam, amani, heiwa
2010-07-07 15:06:20 -05:00
Jonathan Kim
6cd165398b [svn-r18874] Purpose:
Rename '--follow-links' to '--follow-symlinks' 

Description:
    The '--follow-links' option is to follow symbolic links (soft and external).
    Make the name more intuitive and specific to the feature.
    Merged from hdf5 trunk r18873.

Tested:
    jam
2010-05-21 15:31:03 -05:00
Allen Byrne
0fe834c473 [svn-r18855] Added CPack commands for installtion program
Tested: local linux and Windows
2010-05-19 15:03:17 -05:00
Larry Knox
a41fb65b7c [svn-r18836] Added code to config files, libhdf5.settings.in and configure.in to add compiler version information for fortran and C++ in the settings file and the configure output for our common compilers on linux, solaris, and mac(gnu only).
Tested:  amani, jam, linew (h5committest) and with configure on these machines and tejeda.
2010-05-17 17:23:23 -05:00
Albert Cheng
174cc7b19e [svn-r18821] Packed bits codes tidy up. Removed codes that are not needed
any more. Changed algorithm of creating mask which now sits
at the least significant bits. Display data by down shift
first and then mask it for display. Changed the variable
names to reflect the new purpose better.

Tested: AlbertPax (linux)
2010-05-15 00:40:00 -05:00
Allen Byrne
5c2734ec51 [svn-r18815] Move progname and d_status functions from h5tools to h5tools_util
Tested:
    linux and windows
2010-05-14 16:53:41 -05:00
Albert Cheng
a44c942518 [svn-r18796] Enhancement 1853:
Install packed-bits feature for h5dump.

tools/h5dump/h5dump.c:
    Added lots of error checking into parse_mask_list() to catch and
    flagged packed-bits argument errors. For now, the packed bits
    are limited to 1 byte (8 bits) range.

tools/h5dump/testh5dump.sh.in
    Added 10 new packed-bits test to verify normal operation and argument
    error detection.

tools/lib/h5tools.h:
tools/lib/h5tools_str.c:
tools/lib/h5tools.c:
    Only name changes of the packed-bit global variables to reflect
    the nature of the variable better, IMO.

Tested: albertPax (linux)
------------------------------------------------------------------------
2010-05-13 16:42:16 -05:00
Allen Byrne
103da21db1 [svn-r18787] Added h5tools.h include to h5diff_common.h to fix warnings about the new progname and status functions
Tested: local linux
2010-05-13 09:21:22 -05:00
Larry Knox
fa416bde84 [svn-r18779] Add ${DESTDIR} to scripts and Makefiles so that make DESTDIR=<install directory> install, installcheck and uninstall is supported for installing examples, since they are now installed as part of make install. This was necessary for rpmbuilds, but should also be supported otherwise.
Tested:  amani, jam, linew with committest, rpmbuild on jam and amani.
2010-05-12 15:55:52 -05:00
Allen Byrne
84103cef85 [svn-r18773] Add files to support building library with CMake
Tested: Local linux
2010-05-12 13:51:33 -05:00
Allen Byrne
05d75af8b8 [svn-r18757] Enable tools lib to be built as a dll on windows. Added two get/set functions for progname and d_status.
Also add windows import/export declarations to functions.
Updated windows - H5pubconf.h for packed bits function

Tested:
   Windows, linux
2010-05-11 12:49:41 -05:00
Albert Cheng
7c16aec7e1 [svn-r18743] enhancement 1853:
Install packed-bits feature for h5dump.

Allen has installed the feature in the NPOESS feature branch.
I ported it back to the v1.8 branch for v1.8.5 release.

tools/h5dump/testh5dump.sh.in:
    Added tests for the packed-bits feature.
tools/h5dump/h5dump.c
tools/h5dump/h5dump.h
    Added code to parse and handled the packed-bits request.
tools/lib/h5tools.h
tools/lib/h5tools_str.c
tools/lib/h5tools.c
    Added code to print packed-bits.
tools/testfiles/tpackedbits2.ddl
tools/testfiles/tnofilename-with-packed-bits.ddl
tools/testfiles/tpackedbits.ddl
    Expected output files for packed-bits feature.

Tested:
    h5committested the NPOESS branch.
    Tested in the linux VM machine in my Dove.
2010-05-07 15:56:54 -05:00
Mike McGreevy
e984ec4948 [svn-r18710] Purpose:
Improve configure's large-file support control.

Description:

    Modified configure to now attempt to add defines necessary for
    supporting largefiles on all systems, instead of solely on linux. This 
    is in response to user requests to enable largefile support on Solaris 
    by default, as well as to give extra control on AIX (instead of just 
    jamming the necessary flag into the config files).

    The old --enable-linux-lfs flag is being deprecated in favor of the
    --enable-largefile flag (enabled by default), which can be used on all
    platforms. --disable-linux-lfs can still be used to disable largefile
    support (on linux) when the --enable-largefile flag is not specified.

    On systems where large files cannot be supported in this manner,
    configure will report as such.

Tested:

    h5committest
    AIX (NCSA's blue_print machine)
    duty, liberty, and linew.
2010-05-05 12:35:04 -05:00
Albert Cheng
f20bd5f624 [svn-r18701] ID 1853:
Added the configure option --enable-h5dump-packed-bits for the h5dump
optional feature.

Tested:
Jam (default and --disable-h5dump-packed-bits).
2010-05-04 18:57:47 -05:00
Jonathan Kim
cacfe71beb [svn-r18615] Purpose:
Fix for bug 1817 : h5copy fail to copy dangling link by specifying 
    link path directly

Description:
    Merged from hdf5 trunk r18614.

Tested:
    jam, amani
2010-04-22 13:43:19 -05:00
Mike McGreevy
168c5c4a2c [svn-r18580] Purpose:
Autotool Upgrade / Libtool Bug Fix

Description:

    Updated autotools referenced in bin/reconfigure as follows:

    Autoconf 2.64 --> Autoconf 2.65
    Automake 1.11 --> Automake 1.11.1
    Libtool 2.2.6a --> Libtool 2.2.6b-mcg

    The referenced libtool version is a custom version of 2.2.6b. It 
    has been tweaked to fix a bug in libtool that occurs
    when using PGI 10.0 compilers. A check incorrectly categorizes
    the C++ compiler as version 1.0 instead of 10.0, and the link
    line is subsequently set up incorrectly and fails to compile.

    A patch has been made available and will be included in the next
    release of libtool, but in the meantime I've applied the patch to a custom
    installation as indicated above. This bin/reconfigure now references
    the custom installation, and the resulting configure script will correctly
    categorize the PGI 10.0 C++ compiler.

    Ran bin/reconfigure to regenerate configure and makefiles.

Tested:

    jam and amani with PGI 10.0 compilers.
    h5committest
2010-04-15 16:18:42 -05:00
Quincey Koziol
af9d015f46 [svn-r18550] Description:
Bring r18548 from trunk to 1.8 branch:

    Minor cleanups to compile with PGI C compiler 10.x.

Tested on:
    Mac OS X/32 10.6.3 (amazon)
    (tested on trunk)
2010-04-13 09:31:22 -05:00
Jonathan Kim
8438c335ed [svn-r18427] Purpose:
Fix for bug1814 - NPOESS: h5repack doesn't handle references to the groups 
    as an element of a dataset 

Description:
    Merged from hdf5 trunk r18425
    handles object reference to named-datatype as well.
    Add test cases.

Tested:
    jam
2010-03-18 17:31:00 -05:00
Jonathan Kim
52d87caef3 [svn-r18279] Purpose:
Work for bugzilla 1754: h5diff: support comparing through links.

Description:
    merged from hdf5 trunk (18164, 18165, 18166, 18167, 18170, 18266, 18273)

Tested:
    h5committest (jam, amani and linew)
2010-02-18 21:39:22 -05:00
Quincey Koziol
fa1f33701d [svn-r18198] Description:
Trim trailing whitespace from source code files, with following command:

find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//'

Tested on:
    None - eyeballed only
2010-01-29 23:33:04 -05:00
Quincey Koziol
346d487d16 [svn-r18160] Description:
Bring r18159 from trunk to 1.8 branch:

    Bring Coverity fixes from 1/22/10 session to trunk:

r18137:
219: Initialized hid_t to -1 and added close to error block.
189-191: Initialized line to NULL and added free line, and close fp to error block.

r18138:
19: Moved code block for printing that the number of enums is empty to the error block. (Would never have been executed otherwise)

r18139:
Fix coverity item 58.  Moved code related to displaying the parent of a repeated
group to the else(isRoot) section, as the root group has no parent.

r18140:
218: Initialized ret_value variable to -1. Because of throw Exception in default case of switch, the coverity problem would not have executed anyway. Good pratice is to initialize variables.

r18141:
Fix coverity item 92.  Added code to H5E_register_class to free cls in case of
an error.

r18142:
Fix coverity item 91.  Added code to H5E_create_msg to free msg in case of an
error.

r18143:
fixed issue 14,
took away "if" and used #ifndef_xxx.

r18144:
Fix coverity item 110.   Added code to H5Eget_minor to free msg_str in case of
an error.

r18145:
fixed coverity #18 removed "aligned", it is always NULL.

r18146:
Fix coverity item 109.   Added code to H5Eget_major to free msg_str in case of
an error.

r18147:
Fixed coverity #81 and #82, Check for bad pointer(s), but can't issue error, just leave

r18148:
Fix coverity item 97.   Added code to H5FD_fapl_open to free copied_driver_info
in case of an error.

r18149:
Fix coverity item 96.   Added code to H5FD_dxpl_open to free copied_driver_info
in case of an error.

r18150:
Fix Coverity issue #29: Protected cache_ptr dereferences with "if(pass)"
block

r18151:
Fix coverity item 93.   Added code to H5FL_fac_init to free factory and new_node
in case of an error.

r18152:
Fix coverity items 98 and 99.   Added code free allocated space in case of
error.

r18155:
124: Freed head pointer before jumping to done. There was no error handling block and normal exit used same path out.
120-123: Freed list of lists in error handling block.

r18156:
Fix coverity issues 179, 180, 181, 182, 183, 184, 186, 320, 407.  These were resource leak issues where allocated memory was not freed, generally in the case of tests that failed.

Tested on:
   Mac OS X/32 10.6.2 (amazon) debug & production
2010-01-23 02:11:57 -05:00
Jonathan Kim
1eac1391e2 [svn-r18135] 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:39:03 -05:00
Jonathan Kim
3026e03ffe [svn-r18127] Purpose:
Fix for bug1749: Incorrect code in diff() function for links compare
    Also removed duplicated redundant code, which improves performance.

Description:
    When comparing file1 to file2 and both files contain same soft-links and/or
    external-links, if file2's target object path name is longer than file1's
    target object path name, the current code allocates memory buffer 
    incorrectly, so it could end up buffer overflow or wrong result.

Tested on Jam.
2010-01-20 16:26:17 -05:00
Quincey Koziol
bee73cf0aa [svn-r18110] Description:
Bring r18109 from trunk to 1.8 branch:

  Bring r18076-18096 from hdf5_1_8_coverity branch to trunk:

r18076:
Correct Coverity issue #1 by removing dead code

r18077:
Fix coverity item 142.  When an error occurred while copying a linked list in
H5S_point_copy, the library would not free the partially allocated list.  Added
code to free the list in this case.

r18078:
Correct Coverity issue #2 by removing impossible to reach code.

r18079:
Correct #3 by removing impossible to reach code.

r18080:
Correct Coverity issue #4 by removing impossible to reach code.

r18081:
fix coverity 26 , check (dblik->parent) before calls H5HF_man_iblock_detach().

r18082:
Fixed coverity issues 321 and 316.
   321: freed sm_buf in error handling to remove resource leak. 
       Also set sm_buf to NULL after other instances in which 
       it is freed to prevent double free.
   316: initialized nmembs to 0.

r18083:
Correct Coverity issue #6 by removing debugging knob from error reporting code.

r18084:
Fix coverity item 269 + others.  When a error occurred in a function using the
h5tools error framework, the "past_catch" variable would not be set to true
because that statement was before the label that goto jumped to.  This could
cause a failure in the cleanup section to go back to the start of the section,
freeing variables twice, etc.

Moved the label infront of past_catch=TRUE.

r18085:
fixed coverity #27, check if (heap) before use heap->obj....

r18086:
fixed coverity #28, check curr_span not null before use it at if(curr_span &&
   (io_bytes_left==0 || curr_seq>=maxseq))

r18087:
Correct Coverity issue #7 by cleaning up correctly on error

r18088:
Correct Coverity #8 by removing unchanged variable checking code.

r18089:
Correct Coverity issue #9 - remove impossible to reach code.

r18090:
Correct Coverity issue #11 by removing impossible to reach code.  Also clean
up some minor style issues.

r18091:
Fix coverity items 314 and 318.  Changed the improper assertion of the return
value of a library function to a check, and a return(void) on failure.

r18092:
Fix coverity item 70.  Changed the improper assertion of the return value of a
library function to a check, and a return(void) on failure.

r18093:
Correct Coverity issue #12 by removing dead code.

r18094:
Correct Coverity issue #16 by removing debugging code.

r18095:
Fixed coverity issue # 271.

Removed redundant checking and freeing of sm_buf1 and sm_buf2.

r18096:
Correct Coverity issue #17 by refactoring test to remove dead code.

   Also, removed previous "coverity" statements in comments, we'll review
those issues again and see if we can figure them out, now that we have more
experience with Coverity.

Tested on:
    Mac OS X/32 10.6.2 (amazon) debug & prod
2010-01-14 22:58:09 -05:00
Albert Cheng
ccd0afac9b [svn-r18106] bug 1673:
The mixed use of RUNTEST (original) and RUNTESTS (new) caused
confusion. E.g., the timings in test/ was still using the old
$RUNTEST.  It made more sense to use $RUNTEST which is used
by the dejagnu feature of automake.  So, I changed all
$RUNTEST or $RUNTESTS to $RUNEXEC.

config/commence.am & config/conclude.am are the two files
that got changes. Also fixed an error in test/Makefile.am.
The rest are changed by bin/reconfigure.

Tested: h5committested.
2010-01-12 18:57:44 -05:00
Mike McGreevy
b93ed894c6 [svn-r18095] Fixed coverity issue # 271.
Removed redundant checking and freeing of sm_buf1 and sm_buf2.
2010-01-08 15:22:56 -05:00
Neil Fortner
0ec9ee15c8 [svn-r18084] Fix coverity item 269 + others. When a error occurred in a function using the
h5tools error framework, the "past_catch" variable would not be set to true
because that statement was before the label that goto jumped to.  This could
cause a failure in the cleanup section to go back to the start of the section,
freeing variables twice, etc.

Moved the label infront of past_catch=TRUE.

Tested: Fedora
2010-01-08 14:24:47 -05:00
Mike McGreevy
2181d7b0c3 [svn-r18082] Fixed coverity issues 321 and 316.
321: freed sm_buf in error handling to remove resource leak. 
     Also set sm_buf to NULL after other instances in which 
     it is freed to prevent double free.

316: initialized nmembs to 0.
2010-01-08 14:22:40 -05:00
Quincey Koziol
6c9d003d4e [svn-r18013] Description:
Bring r18011 from trunk to 1.8 branch:

   Bring Coverity changes into the trunk: (also other minor cleanups)

r17991:
Fix Coverity items 175 and 176.  Fixed memory leak on error in print_enum in
H5LT.c.

r17993: (r17992 was not a Coverity change)
Close Coverity issue #206: inconsistently checking whether dt->shared was
non-NULL after H5T_alloc() returned a valid 'dt' value (which should guarantee
that dt->shared is valid).

r17994:
Fix Coverity item 149.  Fixed file handle leak on error in H5FD_stdio_open.

r17995:
Fixed Coverity issues 154 to 161:

Added H5MP_close routine to error handling in the event *mp has not been
freed before error.

r17996:
Close Coverity issue #126: potentially leaking merged_spans on routine failure.

r17997:
Fix Coverity items 147 and 148.  Fixed resource leaks on error in H5FDloc.c.

r17998:
Coverity issue 269-272:
   Added integer result variable to functions that could return negative.
       Assigned to unsigned after checking.
   Added H5E_BEGIN_TRY block around H5Tclose and removed H5E_THROW in the
       catch block.
   Checked buffer is NULL before free. Changed HGOTO_ERROR outside of the if
       block to H5E_THROW.

r17999:
Close Coverity issue #127: release temporary spans in more generic manner.
(Also add error checking to previous fix)

r18000:
Resolved Coverity issues 211 and 212 in H5T.c. Added comments to ignore
Coverity warning regarding not checking pointer for NULL, as we are using
an assert which catches the issue.

r18001:
Fix Coverity item 146.  Fixed resource leak on error in H5O_layout_copy.

r18002:
Fix Coverity items 143 and 145.  Fixed resource leaks on error in
H5D_compact_copy and H5D_contig_copy.

r18003:
Close Coverity issue #192: close file on error

r18004:
Fix Coverity issue #125: release temporary spans on error

r18005:
Resolved Coverity issues 5, 25, and 83 (in H5T.c):

   Separated embedded functions in order to check for NULL on return of
       H5I_object before passing into H5T_copy.

   Check to see if new_dt is NULL within error handling before
       dereferencing it.

   Ignore Coverity's dead code warnings as the checks that lead to the code
       are machine dependent.

r18006:
Coverity 63,70,73:  Checked result of function before assigning to an unsigned
variable.

r18007:
Coverity 78,79:   added continue statement if H5Pget_filter2 returns negative.

r18008:
Fixed Coverity issue # 138:

   Added support in error handling to free dst pointer (if allocated) on error.

r18009:
Whitespace & coding style cleanup

Tested on:
    Mac OS X/32 10.6.2 (amazon) w/debug & production
    (h5committested on trunk)
2009-12-13 07:50:01 -05:00