Commit Graph

172 Commits

Author SHA1 Message Date
Vailin Choi
ad317226ea Fix for HDFFV-9277: update the ainfo message after removing an attribute. 2018-07-20 11:21:50 -05:00
Vailin Choi
b178d80be0 Changes made based on feedback from pull request #1039. 2018-05-14 12:26:48 -05:00
Vailin Choi
e6bc326ec0 Fix for HDFFV-10180 Performance issues with H5Oget_info. 2018-04-24 15:10:13 -05:00
Quincey Koziol
f38864920d Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into merge_func_enter_vol
Plus initial steps toward merging API context push into FUNC_ENTER_API* macros
2018-03-18 18:36:49 -05:00
Quincey Koziol
4a17aff408 Add API context interface and use it throughout the library. 2018-03-15 16:54:30 -05:00
Allen Byrne
205d33f332 Cleanup overuse of include files 2018-02-14 10:08:09 -06:00
Dana Robinson
8cb4529211 Fixed misc Warnings flagged by VS2017. 2017-11-26 18:13:18 -08:00
Allen Byrne
8e193705c5 Fix some of the whitespace 2017-11-16 09:28:58 -06:00
Allen Byrne
00e640368e Fix Windows link error 2017-11-14 09:47:04 -06:00
Neil Fortner
bca20b40b4 Initialize hid_t variables in test_Attr_bug9. 2017-11-13 13:43:32 -06:00
Neil Fortner
576b9c5f5f Fix HDFFV-10274. When deleting all (or almost all) of the messages in
an object header chunk, where the total amount deleted was greater than
64K, an error would occur due to an off by one error in the code that
handled that case.  Fixed this and added a test case.
2017-11-10 16:37:40 -06: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
fa66428a6d Description:
Further warning cleanups: from 667 warnings to 503.
2016-09-27 10:29:16 -07:00
Quincey Koziol
dd6c8994c0 [svn-r30017] Description:
Bring warning cleanusp in r29990, 29993, 29997, 29999, 30004 from
revise_chunks branch to trunk.

Tested on:
    MacOSX/64 10.11.5 (amazon) w/serial, parallel & production.
    (h5committest forthcoming)
2016-06-05 19:45:37 -05:00
Jerome Soumagne
2094d86461 [svn-r28138] Add first support for _Bool and make hbool_t a "real" _Bool if available
Fix tests accordingly and fix misuse of hbool_t in various places

Fix initialization of H5Pgcpl/ocpl structs in property decoding routines

Tested on:
    Linux/32 (jam)
    Linux/64 (platypus)
    Linux/PPC64 (ostrich)
    MacOSX/64 10.11
2015-10-20 01:28:17 -05:00
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
1023374492 [svn-r27768] Description:
Complete revamp of package initialization/shutdown mechanism in the library.
Each package now has a single init/term routine.

    This new way should avoid packages being re-initialized during library
shutdown and is also be _much_ more proactive about giving feedback for
resource leaks internal to the library.

    Introduces a new "module" header file for packages in the library
(e.g src/H5Fmodule.h) which sets up some necessary package configuration macros
for the FUNC_ENTER/LEAVE macros.  (The VFL drivers have their own slightly
modified version of this header, src/H5FDdrvr_module.h)

    Also cleaned up a bunch of resources leaks all across the library and tests,
along with addressing many warnings, as I encountered them.

Tested on:
    MacOSX/64 10.10.5 (amazon) w/serial & parallel
    Linux/64 3.10.x (kituo) w/serial & parallel
    Linux/64 2.6.x (ostrich) w/serial
2015-09-13 22:58:59 -05:00
Dana Robinson
c226e58005 [svn-r27626] Various minor warning fixes before major SWMR and VDS merges.
gcc 4.9.2 was used to create the warning list

- implicit casts
- shadowed variables
- various enum issues
- other minor fixes (comments, unused macros, etc.)

Tested on: h5committest
2015-08-31 14:04:23 -05:00
Jerome Soumagne
ab7d724ffd [svn-r27548] Revert r27545 2015-08-21 17:44:22 -05:00
Jerome Soumagne
7ce2d52cf6 [svn-r27545] Add first support for _Bool and make hbool_t a "real" _Bool if available
Fix tests accordingly
2015-08-21 13:52:30 -05:00
Quincey Koziol
adbb64c6cd [svn-r27204] Description:
Clean up compiler warnings before merging in v3 metadata cache changes
from branch.

Tested on:
    MacOSX/64 10.10.3 (amazon) w/serial & parallel
    Linux/32 2.6.x (jam) w/serial & parallel
2015-06-15 11:07:38 -05:00
Mohamad Chaarawi
fc45d5fcb0 [svn-r27133] - Add a new attribute function characterstic for format:
* H5_ATTR_FORMAT(X,Y,Z)  __attribute__((format(X, Y, Z)))
- Rename UNUSED attribute characterstic to H5_ATTR_UNUSED.
- Rename NORETURN attribute characterstic to H5_ATTR_NORETURN

tested with h5committest.
2015-06-01 14:38:09 -05:00
Dana Robinson
7659506fa8 [svn-r26438] Fixed some double promotion warnings from gcc 4.9.2. Most were in
format strings.

Tested on: h5committest
2015-03-11 17:51:14 -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
Mohamad Chaarawi
88fb6b1374 [svn-r25531] remove use of C99 PRI that failed on windows in dtypes.c
fix bugs where hid_t were assumed to be 32 bit ints or herr_t.
2014-08-11 14:13:45 -05:00
Quincey Koziol
33ea1ada24 [svn-r25496] Description:
Merge 64-bit ID changes from branch to trunk.  (Plus a few minor cleanups
that aren't on the branch)

Tested on:
    Mac OSX/64 10.9.4 (amazon) w/C++ & FORTRAN
    (h5committested on branch already for a week)
2014-07-30 15:55:14 -05:00
Dana Robinson
d01ee66666 [svn-r24937] Adds an H5free_memory() function to the library for use with
functions that return library-allocated memory. The test and tool
code were modified to use this new function where it's appropriate.

Fixes HDFFV-7710, HDFFV-8519, and HDFFV-8551

Tested on:
    64-bit Windows 7 w/ VS2012
    32-bit LE linux w/ parallel and fortran (jam)
    32-bit LE linux w/ fortran and C++ (jam)
2014-03-31 18:35:09 -05:00
Dana Robinson
e6cace9ee4 [svn-r24376] Updated all code to use HDmalloc, HDcalloc, and HDfree.
Prep work for adding a memory free function, part of HDFFV-8551.

Tested on:
    32-bit LE linux (jam) 
        * with C++, Fortran
        * with thread safety on

    These are minor changes (almost entirely renaming foo functions
    to HDfoo) that don't change functionality.  This should not
    require a full commit test.
2013-10-30 23:20:36 -05:00
Neil Fortner
3ee8b91dee [svn-r22072] Purpose: Fix rare corruption bug (HDFFV-7879)
Description:
When using the new object header format, it was possible for corruption to occur
if the first object header chunk changed size such that the lenght of the "chunk
0 size" field changed.  This only occurred if there were messages that had not
been decoded.  The original algorithm that changed the object header chunk size
marked all messages as dirty, causing those that had not been decoded to have
both the raw and native form invalidated.  Changed the algorithm to avoid
marking messages dirty and added assertions to catch the case where messages
are dirtied without being decoded (or recently created) first.

Tested: jam, koala, ostrich (h5committest), durandal
2012-03-15 14:16:24 -05:00
Neil Fortner
d849a118c2 [svn-r22070] Purpose: Fix rare corruption bug
Description:
When using the new object header format and adding an attribute with a size near
64K, it was possible for file corruption to occur.  This happened only if the
first object header chunk was smaller than 256 bytes and then grew to larger
than 64K after the attribute was added.

Tested: ostrich, jam, koala (h5committest), durandal
2012-03-15 13:42:51 -05:00
Quincey Koziol
47c3bc7540 [svn-r19272] Description:
Close out various resource leaks and usages of uninitialized memory that
were flagged by valgrind.  [There's still some more valgrind warnings, but
it's better now... :-/ ]

    Also clean up warnings and code formatting.

Tested on:
    Mac OS X/32 10.6.4 (amazon) w/debug & valgrind
    (h5committest forthcoming)
2010-08-20 16:37:12 -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
Quincey Koziol
fd70b2afa8 [svn-r18197] Description:
Trim trailing whitespace from source code files with this 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:29:13 -05:00
Quincey Koziol
1bc07c6aae [svn-r18031] Description:
Bring r18030 from merge_metadata_journaling branch to trunk:

	Bring "brush clearing" changes (whitespace & style issues, mostly) from
metadata_journaling branch to the "merging" branch, to converge the trunk and
the metadata_journaling branch.

	Also, some other minor cleanups along the way.

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 (smirom) 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
2009-12-17 17:21:08 -05:00
Quincey Koziol
7bcb57d578 [svn-r17351] Description:
Clean up code (to align w/future sblock_mdc branch changes), tweak
tests for [slightly] easier debugging, fix memory leak when copying chunked
datasets with I/O filters, fix memory leak of free space section when it was
exactly the right size to use for extending an existing block in the file.

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 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
                                in debug mode
        Linux/64-amd64 2.6 (smirom) 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 production mode
        Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2009-08-13 12:09:55 -05:00
Quincey Koziol
e99906f517 [svn-r17268] Description:
Bring r17266 from 1.8 branch to trunk:

    Clean up various compiler warnings from IRIX64 build

Tested on:
    Mac OS X/32 (amazon) debug & production
    (yes, I know it's not an IRIX64 system :-)
    Too minor to require h5committest
2009-07-29 20:59:24 -05:00
Raymond Lu
afe8d149bb [svn-r17130] Corrected some typos. No test is needed. 2009-06-30 11:08:50 -05:00
Raymond Lu
66b4d3889c [svn-r17126] A revision from last round of checkin (r17119). H5Aopen_name has been deprecated. I
replaced it with H5Aopen in this round.  I also updated some hard-coded numbers with some
macros.

Tested on jam, linew, and smirom.
2009-06-29 13:17:21 -05:00
Raymond Lu
d8c0ebd428 [svn-r17119] Bug fix #1513. Reading an empty attribute caused seg fault. The flag "initialized" in
the attribute structure wan't set correctly.  It caused some confusion in H5A_read.  This
flag was actually redundant because the library can alwasy check if the data buffer is
present.  To fix it, I removed the "initialized" flag in the attribute structure and let
H5A_read check the data buffer.

Tested on jam, smirom, and linex.
2009-06-26 14:41:32 -05:00
Neil Fortner
02fd491bf0 [svn-r16477] Purpose: Fix problem with opening an attribute multiple times through multiple
file handles.

Description:
An attribute's "oloc" field which specifies the file it resides in was located
in the attribute's "shared" structure.  So when an attribute was opened multiple
times all of the handles for that attribute pointed to the same file id, even if
different file id's were used to open the different handles for the attribute.
The "oloc" has been moved to the top level H5A_t struct.

Tested: jam, smirom (h5committest)
2009-02-12 14:06:37 -05:00
Neil Fortner
3c483bd078 [svn-r16475] Purpose: Fix rare error when adding a new object header message
Description:
Since the new object header format, it has been possible for a situation to be
created where none of the messages are large enough to hold a continuation
message and there are no null messages to merge with.  This makes it impossible
to add a new object header chunk.  This case will now be handled by moving every
message in the last chunk to the newly allocated one, except for null messages
which are deleted.

Tested: jam, smirom (h5committest)
2009-02-12 13:59:11 -05:00
Neil Fortner
fb81174e76 [svn-r16473] Purpose: fix problems related to 'self-referential' attributes
Description:
When an attribute was created with a datatype or dataspace that was shared in
the same object header that the attribute was in, the attribute could not be
deleted.  Changes made to ensure that the attribute can be deleted both when the
attribute is in the object header and when it is shared in the heap.  Object
header message decode routines now take an "open_oh" parameter to enable them to
avoid opening the same object header twice.

Tested: jam, smirom (h5committest)
2009-02-12 13:47:04 -05:00
Neil Fortner
220c8585e1 [svn-r15941] Purpose: Close bug 1305.
Description: Added a new function, H5O_alloc_shrink_chunk, which removes all
null messages from a chunk and shrinks the chunk appropriately.  Modified
H5O_merge_null to call this function when a null message is created with a size
>= 64k.  Tests added for this functionality.

Tested: kagiso (h5committest on 1.8 version)
2008-10-23 20:05:41 -05:00
Quincey Koziol
05cc7c234f [svn-r15825] Description:
Fix various problems with a the core & sec2 VFDs.

	Improve the h5_get_file_size() routine to handle files created with
VFDs that use multiple files.

Tested on:
        Mac OS X/32 10.5.5 (amazon) in debug mode
        Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
                                in production mode
        FreeBSD/32 6.3 (duty) in debug mode
        FreeBSD/64 6.3 (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/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 production mode
        Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-10-08 22:44: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
Raymond Lu
8704820d1c [svn-r15395] When an attribute was opened twice and data was written with one of the handles,
the file didn't have the data.  It happened because each handle had its own
object structure, and the empty one overwrote the data with fill value.  This is
fixed by making some attribute information like the data be shared in the
attribute structure.

Tested on smirom, kagiso, and linew.
2008-07-22 15:36:31 -05:00
Scot Breitenfeld
aec106e324 [svn-r14903] Undoing change committed in r14902. 2008-04-30 14:51:13 -05:00
Scot Breitenfeld
5773fd34bc [svn-r14902] Merged fortran_1_8 branch changes r14505:14901 into the trunk. New fortran wrappers added. 2008-04-30 14:23:26 -05:00
Quincey Koziol
53c6f67778 [svn-r14720] Description:
Minor bug fix to H5Aget_num_attrs() to return error when an invalid
location ID is passed in.

Tested on:
    Mac OS X/32 (amazon)
    Too minor to require h5committest
2008-03-11 17:21:37 -05:00
Quincey Koziol
7fc10c0ea7 [svn-r14413] Description:
Change H5P[gs]et_format_bounds() => H5P[gs]et_libver_bounds() and also
enumerated values H5F_FORMAT_{EARLIEST, LATEST} => H5F_LIBVER_{EARLIEST, LATEST}

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
        Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2008-01-14 18:49:12 -05:00