summaryrefslogtreecommitdiffstats
path: root/src/H5Gint.c
Commit message (Collapse)AuthorAgeFilesLines
* Strip HD prefix from string/char C API calls (#3540)Dana Robinson2023-09-151-3/+3
| | | | | | | | | | | | | | | | | | | | | * Strip HD prefix from string/char C API calls * HD(f)(put|get)(s|c) * HDstr* * HDv*printf * HD(s)(print|scan)f * HDperror But NOT: * HDstrcase* * HDvasprintf * HDstrtok_r * HDstrndup As those are not C99 and have portability work-around implementations. They will be handled later. * Fix th5_system.c screwup
* Convert hbool_t --> bool in src (#3496)Dana Robinson2023-09-051-26/+26
| | | | | | | | | | | * hbool_t --> bool in src * Does not remove TRUE/FALSE * Public header files are unchanged * Public API calls are unchanged * TRUE/FALSE --> true/false in src * Add deprecation notice for hbool_t
* Fix for CVE-2018-15671. h5stat -S $POC will result in a crash with ↵vchoi-hdfgroup2023-08-251-15/+7
| | | | | | segmenetation fault. (#3427) It is because the object in the testfile points back to the root group. When the tool tries to traverse the object, it goes back to the root group and then back again.
* Made HGOTO_ERROR a do-while loop (#3308)Sean McBride2023-08-021-74/+74
| | | | | * Made HGOTO_ERROR a do-while loop
* Another round of fixing -Wextra-semi-stmt warnings (#3264)Sean McBride2023-07-241-12/+12
| | | Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Remove HD from HDmem* calls (#3211)Dana Robinson2023-06-291-2/+2
|
* Remove programmer/date from comments (#3210)Dana Robinson2023-06-291-68/+0
| | | | * Removes Programmer: and Date: fields * Fixes a few Modifications: fields leftover from previous work
* Rename HDassert() to assert() (#3191)Dana Robinson2023-06-281-40/+40
| | | | | * Change HDassert to assert * Fix bin/make_err
* Update copyright headers (#2184)Larry Knox2022-11-011-1/+0
| | | | | * Updated source file copyright headers to remove "Copyright by the Board of Trustees of the University of Illinois", which is kept in the top-level COPYING file.
* Develop clang 13 format (#1933)Allen Byrne2022-07-261-17/+17
| | | | | * Update format source to clang 13 * More format changes
* Address some warnings from casting away of const (#1684)jhendersonHDF2022-04-261-1/+1
|
* Removes the STATIC flavor of FUNC_ENTER macros (#1622)Dana Robinson2022-04-081-5/+5
| | | | | * Removes the STATIC flavor of FUNC_ENTER macros
* Simplify function enter macros for performance benefits (#1024)David Young2021-11-081-63/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Take a stab at using constructors to initialize instead of function-entry macros. This is a work in progress. It's good enough to run `many_dsets`. * Committing clang-format changes * Add the `many_dsets` benchmark and some scripts I used on jelly for setting up the build/test environment and for recording/flame-graphing profiles. * Committing clang-format changes * Change my Makefile and environment script to work both on jelly and on mayll (and probably on Summit). * Disable clang-format "fix." * Replace the `if (!H5_TERM_GLOBAL)` test in each FUNC_ENTER_ macro with `if (true)`. * Fix bad grammar in a comment. * Instead of labeling the H5*__init_package routines constructors, fold each into an initialization routine, H5*_init(), and call each of the H5*_init() routines. Call most of the H5*_init() routines from H5_init_library() in an explicit order that I found out earlier by instrumenting each __init_package routine and running the library tests. Roll H5FD*__init_package routines into H5FD*_init() routines. This change ends just-in-time initialization of package dependencies by package initializers. Don't track in per-package variables (H5_PKG_INIT_VAR) whether each package has been initialized. Instead, track in a single library variable whether the whole library is initialized or not. Drive the initialization of packages by H5_init_library() with a table of initializer routines. Also drive the termination of packages by H5_term_library() with a table. Perform initialization as needed from FUNC_ENTER_API_INIT(err). This basically restores the old behavior of that macro. Delete a bunch of #definitions in H5private.h that have fallen out of use with these changes. * Committing clang-format changes * Undo the bad auto-formatting that appears to have occurred in spite of my disabling it. Bracket some code in /* clang-format off */ /* clang-format on */ to prevent a recurrence. * Remove a diagnostic abort(). * Fix a logic error: print a comma between every package terminator run, and don't print an initial comma. * Complete the changes I started in H5_term_library() that undo the bad auto-formatting. Stop tracking whether package "tops" were initialized in per-package variables H5*_top_package_initialize_s. H5_term_library() takes care of that for them. Remove H5R_top_term_package() and H5R_term_package(), they don't do anything. * Committing clang-format changes * NFCI. Simplify macro text: replace `if (true) {` with `{`. * Fix formatting and suppress clang-format on a longer range. * Quiet some unused label, unused variable complaints that cropped up after I simplified the FUNC_ENTER_ macros for the sake of performance. * Committing clang-format changes * Delete some programs and scripts that don't belong in the pull request. * Use the right function-entry macro. * Use a sensible format and disable auto-formatting. * Stop calling do-nothing initializer H5FS_init(). Delete it. * Document what changes to make if the default VFD changes. * While I am here, change an `await_prior` flag on the terminator table to `true` to match the previous, non-table-driven code that was here. Found the oversight making the following changes: NFCI: insert an empty line and copy over slightly-edited comments from the previous version, where those comments still correctly explained how library termination operated. * NFCI: lower a staircase. * Replace every occurrence of FUNC_ENTER_NOAPI_INIT(...) with H5_PUSH_FUNC since that is all that that macro does any more. Quiet a bunch of new warnings by changing FUNC_ENTER_NOAPI(...) to FUNC_ENTER_NOAPI_NOERR and removing disused `done:` labels. * NFCI: add curly braces around a multiline statement. * Quiet a signed/unsigned comparison warning. * Add some documentation about library initialization and shutdown. * Make sure that the library is initialized, or else that initialization is already underway, before performing any VFD's initialization. * Committing clang-format changes * Committing clang-format changes * Reduce differences from `develop` branch. * Always initialize `tot_init`. * Committing clang-format changes * Fix typo: H5SL_init initializes skip lists, not VOL. * Remove H5_TERM_GLOBAL test in H5T_init. H5T_init was unusual in that it tested H5_TERM_GLOBAL and exited early if it was set. No other module initializers did that, and I cannot find any reason that should be necessary. Tests still pass when I remove it, so away it goes. * Use HD prefix. * Add function header comments. * Drop the intermediate variable, it's only used once. * Extract subroutine `H5FDperform_init(hid_t (*init)(void))` that initializes the library, if necessary, before calling its VFD-initializer argument. Use H5FDperform_init in the definition of the symbols H5FD_<vfd> (e.g., H5FD_SEC2), which may be evaluated before the library is initialized, like so: ``` ``` I implement H5FDperform_init in its own source file, H5FDperform.c, and exclude that file from trace processing because the `bin/trace` cannot deal with the function-pointer type. * Straggler from last: add new source file src/H5FDperform.c. * Committing clang-format changes * Add a missing file to the MANIFEST. * Switch to FUNC_ENTER_API_NOINIT in H5FDperform_init() and hbool_t in H5_term_library(). Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Fixes some H5SL include statements (#758)Dana Robinson2021-06-161-0/+1
|
* Update license url (#332)Larry Knox2021-02-171-1/+1
| | | | | | * Modify temporary rpath for testing in java example scripts. * Update URL in source file Copyright headers for web copy of COPYING file - src and test directories.
* Expand ID dec_ref and close callbacks to allow for asynchronous close ↵Quincey Koziol2020-12-011-3/+3
| | | | | | | | | | | operations (#135) * Expand ID dec_ref and close callbacks to allow for asynchronous close operations. * Fix typo * Rename token -> request, remove programmer name * H5E_ATOM to H5E_ID
* Replace H5E_ATOM major error category with H5E_ID (#121)Dana Robinson2020-11-301-2/+2
| | | | | | | | | | * Renames H5I_ATOM to H5I_ID, among other related changes * Java has been updated. * Fortran is failing on my VM, even though I don't touch that. * Adds a RELEASE.txt note for H5E_ATOM to H5E_ID changes * Fixes typos in comments
* Move package initialization code for H5A and H5G to internal source file. (#125)Quincey Koziol2020-11-251-0/+180
|
* Clang-format of source filesAllen Byrne2020-09-301-294/+264
|
* Clean up private / package / static namespace issues (function naming, whichQuincey Koziol2020-08-061-18/+18
| | | | | | header file, FUNC_ENTER / LEAVE, etc). Removed remaining personal email addresses from library source code (still needs cleaned from other directories). Misc. warning, style, and whitespace cleanup.
* Trim trailing whitespaceQuincey Koziol2020-04-201-2/+2
|
* H5T_copy() constification plus Quincey's contributions.David Young2020-01-291-1/+1
|
* Squashed commit of the token_refactoring branch:Dana Robinson2020-01-161-6/+8
|
* Remove most debugging shims & scaffolding.Quincey Koziol2018-11-041-16/+0
|
* Updates after merging changes from develop.Quincey Koziol2018-10-261-1/+1
|
* Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into ↵Quincey Koziol2018-10-251-1/+0
|\ | | | | | | stackable_vol
| * Split H5VLnative.h into public and private files and updatedDana Robinson2018-10-201-1/+1
| |
* | Squashed commit of private branch changes to support stackable VOL plugins.Quincey Koziol2018-10-251-2/+18
|/ | | | modified: test/dsets.c
* VOL FEATUREDana Robinson2018-10-101-2/+3
|
* Remainder of vol_normalization changes (dataset, attribute, files, objects).Dana Robinson2018-09-241-52/+16
|
* Normalization with vol_integration (property lists, file drivers,Dana Robinson2018-09-211-25/+19
| | | | other misc).
* Removed 'VOL' versions of FUNC_ENTER macros as well as empty functionsDana Robinson2018-09-181-201/+12
| | | | orginally intended to support the full SWMR feature.
* Add API context interface and use it throughout the library.Quincey Koziol2018-03-151-75/+389
|
* Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to ↵Larry Knox2017-04-251-6/+4
| | | | | | | | | | 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.
* Tentative fix for valgrind issues related to EoC.Dana Robinson2016-11-261-8/+9
| | | | | | | | | Adds /*out*/ parameters to H5O_close() and H5F_try_close() so that H5D/G_close() will know when H5O_close() has triggered a file close and thus the file struct is not reliable. Also removes the H5F_CLOSING() macro and related which were formerly used to check if the file was closing.
* Two minor cache changes:Dana Robinson2016-11-201-1/+1
| | | | | | | | | | | | * Evict-on-close behavior is now skipped when the file is closing. This fixes a potential issue discovered by Valgind on Windows where potentially garbage data would be availble for manipulation. * Added brackets to some code in the tagged entry evict iterators so that the flag that determines if progress was made only gets set if things are actually evicted. This prevents an infinite loop (and emits an error) when pinned entries prevent eviction and thus progress.
* Evict-on-close now works with groups.Dana Robinson2016-10-281-0/+8
| | | | | test/evict_on_close.c has been updated to generate groups but does not yet check EoC works correctly.
* - Removed non-implemented code from H5Gint.cDana Robinson2016-09-301-19/+0
| | | | | - Removed commented-out debug code from H5Dint.c - Added blank lines to eliminate delta in a fortran file.
* Cleaned up feature for dissemination to LLNL:Dana Robinson2016-09-191-7/+11
| | | | | | | - Removed support for datatypes. - Commented out support for groups - General change clean-up - Added a list of improvements to BRANCH.txt
* [svn-r30108] Moved group flush and evict code to H5G_close from H5Gclose.Dana Robinson2016-06-261-1/+18
|
* [svn-r30068] Description:Quincey Koziol2016-06-131-0/+8
| | | | | | | | Bring metadata cache corking to trunk. Tested on: MacOSX/64 10.11.5 (amazon) w/serial, parallel & production (h5committest forthcoming)
* [svn-r29081] - merge in the phdf5_metadata_opt/ branch with the collective ↵Mohamad Chaarawi2016-02-101-7/+7
| | | | | | | | metadata optimizations. - rename H5AC_dxpl_id to H5AC_ind_read_dxpl_id and update all usage in the library tested on bb-8 with parallel and serial.
* [svn-r28950] - remove META_FLUSH_COLLECTIVELY property for delayed sanity ↵Mohamad Chaarawi2016-01-211-6/+6
| | | | | | | | | | checks from metadata dxpls - remove H5AC_ind_dxpl_id and use only H5AC_dxpl_id everywhere instead. - remove flush_me_collectively flag from cache entries - add a collective sanity check (MPI_Barrier) for every HDF5 API routine that could possibly touch the file. This is trigerred when the environment variable H5_COLL_API_SANITY_CHECK is set to a non 0 digit. tested on BB-8 with serial and parallel.
* [svn-r28285] move private H5G_get_create_plist from public source file to ↵Mohamad Chaarawi2015-11-051-0/+94
| | | | internal one.
* [svn-r27768] Description:Quincey Koziol2015-09-141-38/+7
| | | | | | | | | | | | | | | | | | | | | | 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
* [svn-r27133] - Add a new attribute function characterstic for format:Mohamad Chaarawi2015-06-011-1/+1
| | | | | | | | * 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.
* [svn-r24285] Eliminate several "passing argument ... with different width ↵Larry Knox2013-10-101-1/+1
| | | | | | due to prototype" warnings by casting constants to size_t where expected by string functions. Tested on jam, koala,ostrich and platypus with h5committest.
* [svn-r23219] Description:Quincey Koziol2013-02-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* [svn-r21923] Description:Quincey Koziol2012-02-101-62/+1048
| | | | | | | | | Add FUNC_ENTER macros for package-private routines and begin process of switching package routines to use them. All H5G routines are currently finished. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug, production & parallel
* [svn-r21919] Description:Quincey Koziol2012-02-091-4/+4
| | | | | | | | Refactor function name macros and simplify the FUNC_ENTER macros, to clear away the cruft and prepare for further cleanups. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug, production & parallel