Commit Graph

50 Commits

Author SHA1 Message Date
Dana Robinson
2385b2b0ad [svn-r27800] Minor warning fixes in the library tests.
Tested on: jam (too minor for h5committest)
2015-09-16 08:54:23 -05:00
Quincey Koziol
27dd4e0f05 [svn-r26597] Description:
Bring r26500 from autotools_rework branch to trunk:

    Remove the LLONG_TO_FP_CAST_WORKS macro/define, as it targets problems with
the Visual Studio 6 compilers.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (Daily tested on branch for 2+ days)
2015-03-25 21:25:32 -05:00
Quincey Koziol
b03d04742d [svn-r26596] Description:
Bring r26499 from autotools_rework branch to trunk:

    Remove ULLONG_TO_FP_CAST_WORKS macro/define, as it only applies to older
platforms we aren't supporting any longer.

Tested on:
    Linux/32 2.6.18 (jam) w/serial & parallel
    (Daily tested on branch for 2+ days)
2015-03-25 20:47:41 -05:00
Dana Robinson
d8e3d8e908 [svn-r26333] Eliminates gcc warnings due to -Wunsuffixed-float-constants.
- Adds 'F' suffixes for most float constants.

- A few constants MUST be of type double. These now receive the long
  double L suffix and are then cast to double. I do this via a new
  H5_DOUBLE() macro which was added to H5private.h.

Fixes: HDFFV-9148

Tested on: h5committest
2015-03-01 13:48:54 -05:00
Quincey Koziol
482a9c28e7 [svn-r24030] Description:
Clean up more compiler warnings.

Tested on:
    Mac OSX/64 10.8.4 (amazon) w/gcc, C++ & FORTRAN
    (too minor to require h5committest)
2013-08-19 17:13:15 -05:00
Raymond Lu
b337ae979d [svn-r22076] #Issue 7922 - H5Pset_data_transform had seg fault with some operations like x*-100.
The parser mistaked "-" as substraction.  I fixed it and also fixed another problem
with some special cases like 100-x and 2/x.

Tested on jam, koala, and ostrich.
2012-03-15 15:53:14 -05:00
Raymond Lu
1c61b6fe13 [svn-r19481] I'm backing out my fix for bug 1707 because there're some unresolved issues - r19441 and 19467.
Bug 1707 is that H5Eset_auto causes a seg fault when an application uses -DH5_USE_16_API with 
the 1.8 library to compile.  

I created a branch off the trunk called set_auto to continue working on the problem.

Tested on jam - backing out, simple.
2010-09-27 14:02:48 -05:00
Raymond Lu
d6c6a34a8f [svn-r19457] Bug fix for 1707 - H5Eset_auto causes a seg fault when an application uses -DH5_USE_16_API with the 1.8 library to compile. The cause is from the mismatch of H5Eprint1 and H5Eprint2 set
through H5Eset_auto.  I changed the union in the structure H5E_auto_t.  Another change is to 
make H5Eget_auto fail if H5Eset_auto is called to set the printing function.  I'll write a 
document for it.

Tested on heiwa, jam, and amani.

The property change in configure.in, config, and Makefile.am came from the merge of the 1.8 
library change.
2010-09-21 11:46:38 -05:00
Quincey Koziol
52839cdf69 [svn-r19297] Description:
Whack a few more memory errors exposed by valgrind.

    Make the debugging dump output a little bit prettier.

Tested on:
    Mac OS X/32 10.6.4 (amazon) w/debug
    (h5committest forthcoming)
2010-08-25 15:27:07 -05:00
Quincey Koziol
d3a9b81fd0 [svn-r18346] Description:
Bring Coverity fixes back from branch to trunk:

r18336:
Fix coverity issues 275, 276, 277, 323, 432, 433, and 434

r18337:
Fix Coverity issue #106: release free space section node on error

r18338:
Fixed Coverity #94 - In H5P_register, new_class wasn't closed when there's an
error after it's created.

r18339:
Fix Coverity #185 - In test_conv_str_1, BUF wasn't freed when there's an error
in this function.

r18340:
Correct error in r18337 that wasn't releasing indirect fractal heap block
early enough.

r18341:
Close nodes if any failed in the middle of allocating new nodes. Coverity 140
and 141

r18342:
Correct [another] problem w/r18337.

r18343:
Fix coverity items 185, 20, and 21.

r18344:
Fix Coverity 213 - In H5FD_family_close, the double pointer file->memb was
dereferenced without NULL checking 
(We believe).

r18345:
Fix Coverity issue # 210;  removed NULL check after pointer dereferenced in
H5HFdblock.c.   Also assigned NULL to pointer in H5Pint.c to fix segmentation
fault.

Tested on:
    FreeBSD/32 6.3 (duty) in debug mode
    FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, 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, in production mode
    Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
        in production mode
    Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
    Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
    Mac OS X/32 10.6.2 (amazon) in debug mode
    Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
        in production mode
2010-02-27 15:08:03 -05:00
Quincey Koziol
0c39a78927 [svn-r18300] Description:
Bring Coverity fixes from branch to trunk:

r18282:
   Fix Coverity issue #428 by wrapping testing calls with if(pass) {} block.

r18283:
   Fix Coverity issue #425 by wrapping test calls in if(pass) {} block

r18284:
Issue 166:  init_error() malloc'd 3 pointers in initialization and never freed 
inc ase of errors. Init pointers to NULL, check allocation results and free
allocations in error block

r18285:
   Fix Coverity issue #410 by wrapping test calls with if(pass) {} block.

r18286:
Issue 165:  custom_print_cb() needed allocations freed in error block.

r18287:
Fix coverity issue # 409

Added if (pass) checks around calls to flush_cache. Additionally, 
added a check for file_ptr = NULL after call to setup_cache.

r18288:
Fix coverity# 107 free fh in H5HF_close() correctly before exit the function
even when failure occurs.

r18289:
   Fix Coverity issue #429: correct failure return values to match return type
from routine.

r18290:
   Fix Coverity issue #103: release allocated indirect section  on error

r18294:
Issue 153, 152:  Check allocations and free allocations in error block. Also
cleaned up hid_t identifer that were opened in error block.

r18295:
Fix coverity# 101 free new_loc in H5HF_man_iter_start_entry() correctly before
exit the function even when failure occurs

r18296:
Fix coverity# 100 free down_loc in H5HF_man_iter_down() before exit the function
when failure occurs

r18297:
Fixed coverity issues 54, 55 and 216.  Correctly handle the various ways that
allocation of attr_name can fail in test_attr_basic_write.

r18298:
Fix coverity# 119 free object in H5HG_read() before exit the function when
failure occurs

r18299:
Fix coverity issue #112:

Add cleanup during error handling of H5MP_create.


Tested on:
    Mac OS X/32 10.6.2 (amazon) w/debug & production
    Misc. Linux configurations (on original checkins)
2010-02-19 21:23:44 -05:00
Neil Fortner
c7aa94f4ec [svn-r16803] Purpose: Fix bug 1548
Description:
When writing data to a dataset, the data transform was performed after type conversion.
This caused an error if the file type was non-native.  This has been changed so data
transforms are always performed on the memory type.

Tested: jam, linew. smirom (h5committest)
2009-04-20 11:54:52 -05:00
Quincey Koziol
b4ff3e6e79 [svn-r16560] Description:
Remove another call to H5E_clear_stack() from within the library.

    Clean up lots of compiler warnings.

Tested on:
    Mac OS X/32 10.5.6 (amazon)
    (followup on other platforms forthcoming)
2009-03-10 14:00:39 -05:00
Allen Byrne
5d69e87ff0 [svn-r16489] Fixed bug #1459 by eliminating the macro long_long and replacing all instances with long long.
Tested:
   h5comittest
   fedora 10 x64
   Vista 32, VS2005, IVF101
   XP32, Cygwin
2009-02-18 15:02:05 -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
Quincey Koziol
d9e5ca72f3 [svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2

	Fix thread-safe error stack initialization for API versioned error
stack printing 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-11 11:24:11 -05:00
Quincey Koziol
d6bb18abbc [svn-r13648] Description:
Rename new error handling API routines from H5E<foo>_stack() to
H5E<foo>2().

Tested on:
    Mac OS X/32 10.4.9 (amazon)
    FreeBSD/32 6.2 (duty)
    FreeBSD/64 6.2 (liberty)
2007-04-11 20:59:45 -05:00
Albert Cheng
ed7d456e51 [svn-r13253] Updated all C and C++ style source code files with the THG copyright notice.
Tested platform:
Kagiso only since it is only a comment block change.  If it works in one
machine, it should work in all, I hope.  Still need to check the parallel
build on copper.
2007-02-07 09:56:24 -05:00
Leon Arber
43e7c6dbed [svn-r12880] Purpose: Bug fix
Description: Fix some memory-related bugs in the data transform code

Tested:
    kagiso w/ valgrind 3.2.1
2006-11-07 20:53:31 -05:00
Quincey Koziol
e40557304f [svn-r12803] Description:
Finish new version of the I/O pipeline message, which is much smaller than
the previous version.  This version is used with the "use the latest version
of the format" flag.

    Closed several memory leaks/overruns (found with valgrind).

    Also, lots of compiler & formatting cleanups.

Tested on:
    Linux/32 2.6 (chicago)
    Linux/64 2.6 (chicago2)
2006-10-23 15:40:14 -05:00
Quincey Koziol
88c15b1617 [svn-r11771] Purpose:
Code cleanup

Description:
    Fix a bunch of warnings flagged by Windows compilers.


Platforms tested:
    FreeBSD 4.11 (sleipnir)
    Too minor to require h5committest
2005-12-08 13:34:51 -05:00
Albert Cheng
3920d718b7 [svn-r11524] Purpose:
Inserted copyright notice.

Platforms tested:
Tested in heping only since only a comment block was added.
2005-10-10 22:27:47 -05:00
Quincey Koziol
6b45f5172c [svn-r11245] Purpose:
Code cleanup

Description:
    Trim trailing whitespace, which is making 'diff'ing the two branches
difficult.

Solution:
    Ran this script in each directory:

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


Platforms tested:
    FreeBSD 4.11 (sleipnir)
    Too minor to require h5committest
2005-08-13 15:53:35 -05:00
Quincey Koziol
34bd25f361 [svn-r11144] Purpose:
New port

Description:
    Elena asked me to check in her NEC SX-6 work, so here it is! :-)

Platforms tested:
    FreeBSD 4.11 (sleipnir)
    NEC SX-6 (by Elena)
2005-07-22 20:55:12 -05:00
Quincey Koziol
55f8e19fc7 [svn-r10699] Purpose:
Code cleanup

Description:
    Switch name & logic from H5_LLONG_TO_FP_CAST_BROKEN to
H5_LLONG_TO_FP_CAST_WORKS, to better match the rest of the library.

Platforms tested:
    FreeBSD 4.11 (sleipnir)
    Too minor to require h5committest
2005-04-29 15:31:29 -05:00
Leon Arber
936f41d3f0 [svn-r10661] Purpose:
Bug fix....

Description:
Despite passing all tests, the previous checkin had a copy/paste typo that
resulted in the tests being run under the wrong conditions.

Solution:
Fixed typo.

Platforms tested:
yet another minor change... copper only.

Misc. update:
2005-04-25 14:40:36 -05:00
Leon Arber
1208855335 [svn-r10660] Purpose:
bug fix (sorta)

Description:
Rename H5_LLONG_TO_FP_CAST_WORKS to H5_LLONG_TO_FP_CAST_BROKEN

Solution:
Since a test for  H5_LLONG_TO_FP_CAST_WORKS is not present in the configure script,
the dtransform test would assume that this cast doesn't work and skip the test.  Change the variable around
so that, by default, it is assumed a long long to double cast does work.

Platforms tested:
minor change: copper, sol

Misc. update:
2005-04-25 14:33:44 -05:00
Leon Arber
0ae785b76b [svn-r10658] Purpose:
Bug fix

Description:
The intel compiler on windows doesn't support long long to double conversion.

Solution:
Added a flag  H5_LLONG_TO_FP_CAST_WORKS.  When it is not defined, the data transform will issue
an error when someone tries to perform a transform from long long to double and the long long to double
dtransform test will be skipped.

Platforms tested:
heping, sol, copper

Misc. update:
2005-04-25 14:14:01 -05:00
Quincey Koziol
427ff7da28 [svn-r9727] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-)

Description:
    Generally speaking, this is the "signed->unsigned" change to selections.
However, in the process of merging code back, things got stickier and stickier
until I ended up doing a big "sync the two branches up" operation.  So... I
brought back all the "infrastructure" fixes from the development branch to the
release branch (which I think were actually making some improvement in
performance) as well as fixed several bugs which had been fixed in one branch,
but not the other.

    I've also tagged the repository before making this checkin with the label
"before_signed_unsigned_changes".

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel & fphdf5
    FreeBSD 4.10 (sleipnir) w/threadsafe
    FreeBSD 4.10 (sleipnir) w/backward compatibility
    Solaris 2.7 (arabica) w/"purify options"
    Solaris 2.8 (sol) w/FORTRAN & C++
    AIX 5.x (copper) w/parallel & FORTRAN
    IRIX64 6.5 (modi4) w/FORTRAN
    Linux 2.4 (heping) w/FORTRAN & C++


Misc. update:
2004-12-29 09:26:20 -05:00
Quincey Koziol
8d422da811 [svn-r9526] Purpose:
Bug fix, sorta.

Description:
    Revert change to H5Pget_data_transform() which changed len of buffer
returned to be inconsistent with H5Iget_name(), etc.  We should discuss this
change and apply it to all the similar functions if we decide to change the
return value.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-11-12 09:16:58 -05:00
Leon Arber
091fbb49e0 [svn-r9518] Purpose:
New tests

Description:
Added tests for chunked reads/writes.

Platforms tested:
eirene + sol + copper

Misc. update:
2004-11-11 12:15:33 -05:00
Leon Arber
9268be2d0d [svn-r9501] Purpose:
Code clean-up

Description:
Rewrote code to make it simpler.

Added more data type tests

Solution:
Simplified code a lot in preparation for addition of new test cases.


Platforms tested:
heping + sol + copper
2004-11-03 12:28:26 -05:00
Quincey Koziol
17fec21284 [svn-r9486] Purpose:
Code cleanup

Description:
    Change loops for comparing results to use 2-D array lookups, since that's
what we've really got and the older 1-D array lookups was making the PGI C
compiler whine about array bounds issues.

Platforms tested:
    Linux 2.4 (heping) w/PGI C
    Not relevent to other platforms, no h5committest
2004-10-28 22:32:24 -05:00
Quincey Koziol
c274ffe1c9 [svn-r9466] Purpose:
Bug fix

Description:
    Clean up potential buffer overflow in strncpy()

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-10-26 21:12:02 -05:00
Leon Arber
22696535f5 [svn-r9464] Purpose:
Bug fix.

Description:
dtransform test still failed on windows because it was attempting to create a
ullong dataset.

Solution:
Removed creation of ullong dataset as well if H5_ULLONG_TO_FP_CAST_WORKS was
not defined.

Platforms tested:
windows
2004-10-26 16:48:15 -05:00
Leon Arber
1a869e39dc [svn-r9463] Purpose:
Bug fix.

Description:
unsigned long long test fails on windows because windows cannot convert from
ullong to double

Solution:
Skip unsigned long long test if H5_ULLONG_TO_FP_CAST_WORKS is not defined.

Platforms tested:
eirene and will do windows test asap.
2004-10-26 16:04:31 -05:00
Leon Arber
4c8429e3d2 [svn-r9462] Purpose:
Added tests
Code cleanup

Description:
New tests added for new version of H5Pget_data_transform and additional tests
to make sure that error conditions are handled properly by both
H5Pset_data_transform and H5Pget_data_transform.

Also cleaned up code to make it more compact.

Platforms tested:
sol + eirene + copper

Misc. update:
2004-10-26 15:47:22 -05:00
Leon Arber
b7a3a55b77 [svn-r9442] Purpose:
Add code more code to test H5Pget_data_transform and H5Pset_data_transform

Description:
Added a test to verify that H5Pset_data_transform will correctly replace a
data transform with a new one and properly use the new transform on the data.

Added a test to verify that H5Pget_data_transform properly returns the
transform string.

Platforms tested:
sol + eirene + copper

Misc. update:
2004-10-20 16:09:54 -05:00
Leon Arber
4f846baa4a [svn-r9432] Purpose:
Skip test.

Description:
Known failure in char and schar types for dtransform test on AIX and SGI.

Solution:
Temporary skip this test until bug is fixed.

Platforms tested:
copper (minor change)
2004-10-18 17:54:55 -05:00
Leon Arber
b6fa15d1bb [svn-r9431] Purpose:
Bug fix.

Description:
If a subtest failed, the error would not propogate properly to the main
function, thereby resulting in a succesful run, even though the test failed.

Solution:
Fixed error return values.  The dtransform test will now fail for real.

Platforms tested:
sol + eirene + copper
2004-10-18 17:47:53 -05:00
Leon Arber
841a072c93 [svn-r9423] Purpose:
Description:
Make the test check transforms on all types, and expanded testing for unsigned types.

Solution:

Platforms tested:
sol + eirene
2004-10-14 14:56:27 -05:00
Leon Arber
5d9f7ebd4c [svn-r9369] Purpose:
Added tests for most of the types that were added to the data transform code.

Further tests will also be added shortly.


Platforms tested:
sol + eirene

Misc. update:
2004-10-05 17:44:17 -05:00
Albert Cheng
0a69acf992 [svn-r9298] Purpose:
Bug fix.

Description:
the Data transformation code that failed when a data transform property
for simple expression is fixed.  Turned the tests back on.

Platforms tested:
Tested in copper (pp) where the failure appeared.  Also in eirene
as double check.  No h5committest as the change is trivial.
2004-09-21 20:19:54 -05:00
Albert Cheng
68f16ab5fa [svn-r9272] Purpose:
Bug fix.

Description:
THe trivial transform property list creation triggered a code
error.  Skip these two tests temporary.  Will fix it later.

Platforms tested:
Copper where it exposed the failures.

Misc. update:
2004-09-17 18:56:57 -05:00
Leon Arber
5075bb85d7 [svn-r9268] Purpose:
Added tests for polynomial transforms.

Platforms tested:
sol + eirene

Misc. update:
2004-09-16 13:12:19 -05:00
Quincey Koziol
c97fddc786 [svn-r8892] Purpose:
Code cleanup

Description:
    Clean up a bunch of warnings and bring new code better inline with current
library coding practice.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest

Misc. update:
2004-07-16 15:48:40 -05:00
Quincey Koziol
e5e786f589 [svn-r8782] Purpose:
Code cleanup

Description:
    Clean up almost all warnings from Windows builds.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-01 15:02:47 -05:00
Leon Arber
1867c05efb [svn-r8488] Purpose:
Bug fix.

Description:
Fixed handling of trivial data transform expressions (like 5/3 + 3) and some
data coversion fixes.  Also added more tests to dtransform.c

Solution:
Added some more checks in the H5Z_xform_reduce_tree function to see if perhaps
the transform expression is complicated and is a non-trivial reduction.
Added tests for data conversion to dtransform as well as tests for a trivial
data transform expression.

Platforms tested:
h5committest'ed, except used arabica instead of sol and didn't do on copper
b/c no logon there. Problem noted with mtime test...doesn't appear to be
related to anything having to do with data transforms.
2004-05-06 17:44:38 -05:00
Quincey Koziol
4996258268 [svn-r8483] Purpose:
Bug fix

Description:
    Fix problems compiling with g++.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/CC=g++
2004-05-05 15:25:26 -05:00
Albert Cheng
0c6229a68d [svn-r8479] Purpose:
New Feature

Description:
Add the data transform function, H5Pset_transform().

Platforms tested:
"h5committested".
Copper was down.  Ran parallel tests in sol instead.

Misc. update:
2004-05-03 18:34:42 -05:00