Commit Graph

3700 Commits

Author SHA1 Message Date
Dana Robinson
2122a428cd
Corrects use of unitialized bytes in the chunk_info test (#106) 2020-11-20 12:11:36 -06:00
Dana Robinson
793b3d1bae
Revert "Switch ID code to use a hash table instead of a skip list (#52)" (#104)
This reverts commit a50d211755.
2020-11-19 20:54:00 -06:00
Dana Robinson
a50d211755
Switch ID code to use a hash table instead of a skip list (#52)
* Brings hash table ID code over from Bitbucket branch

* Includes reformatting via clang.

* Excludes uthash.h from reformatting.

* Still has the failing test issue in tid.c. This should only be a
  problem if a custom ID type is used and its free function deletes
  other IDs.

* Fixes munged H5_GCC_DIAG_ON/OFF macros in H5I.c

The H5_GCC_DIAG_ON/OFF macros used to turn off fallthrough warnings
in uthash.h (external code) were munged when formatting with clang
due to their lack of quotes.

e.g.;

    H5_GCC_DIAG_OFF(implicit-fallthrough)

was munged to:

    H5_GCC_DIAG_OFF(implicit - fallthrough)

which compiles, but is useless. So, with quotes, this is now:

    H5_GCC_DIAG_OFF("implicit-fallthrough")

which survives reformatting with clang.

* Fixes issues with user callbacks in the ID hash tables

The skip lists (previously) used to handle IDs use a mark-and-sweep
scheme to deal with user-defined ID delete callbacks which themselves delete
other IDs in the list. The uthash hash table implementation used to manage
the IDs in this feature branch does not have this ability.

This commit restores the skip lists for non-library ID types in lieu of
significantly modifying the uthash code. The hash tables are used to
manage the library IDs as those do not delete other IDs when they are
closed.

* Adds uthash.h to MANIFEST

* Removes implicit-fallthrough diagnostic disable

Removing -Wimplicit-fallthrough=5 means that the uthash code
no longer raises warnings so the H5_GCC_DIAG_OFF/ON macros
that disabled those warnings have been removed from H5I.c.

* Adds a test to ensure you can delete IDs in the H5Iiterate() callback
2020-11-17 12:06:39 -06:00
Michel Zou
0db1fe81d5 CMake: MINGW implies WIN32 2020-10-30 16:09:28 +01:00
Dana Robinson
2266ee56c3 Fixes minor issues in various virtual file drivers
- HDFS VFD files now ignored in the Autotools when the HDFS VFD is not
  being built.
- All VFD init code uses idiomatic H5I_INVALID_HID instead of -1
  or FAIL.
- The HDFS VFD now includes H5FDdrvr_module.h in the right place.
- The HDFS tests in test/hdfs.c no longer pass NULL to VERIFY macros, which
  raised warnings.
- Minor tweaks to fix const, unused variables, etc. warnings in
  several VFDs.
2020-10-28 23:50:37 -07:00
Dana Robinson
ca3659a014 HD prefix updates in src/ and test/
Adds missing HD prefixes to API calls in src and test.

Adds some extra processing to bin/checkposix to keep the noise
levels down when running the script (not comprehensive).
2020-10-23 17:13:05 -07:00
Quincey Koziol
66bcfd97a8
Update reformatting settings, trace wrapping, and printf-format strings (#22)
* Add BEGIN_FUNC / CATCH / END_FUNC to macros

* Remove incorrect trailing '{'

* Update trace script to wrap H5TRACE macros at 110 characters and improve
comments for code that performs this operation.

* Clean up printf-formatting in H5public.h and correct some oversights in the code.

* Reformat with BEGIN_FUNC / END_FUNC handled correctly by clang-format

* Run clang-format on changes.

* Correct H5_SIZEOF_HSIZE_T/H5_SIZEOF_HSSIZE_T macros to match typedef.

* And make the undef value match also.

* Update comment

* Update clang-format actions to exclude generated files.

* Post-process generated H5LTparse.h file as well as H5LTparse.c file.

* Fix formatting

* Update version of github clang-format action
2020-10-06 17:37:42 -05:00
Allen Byrne
b2d661b508 Clang-format of source files 2020-09-30 09:27:10 -05:00
Allen Byrne
274cd0ba1d Pre-format fixes for warnings as errors 2020-09-29 10:24:49 -05:00
David Young
14851e3b82 Merge pull request #2650 in HDFFV/hdf5 from ~DYOUNG/werror:rebased-fprintf-experiment to develop
* commit 'c0fbc5c086566d5d3c1d1ef26baa81a53d59fc08': (24 commits)
  Use the right format string, "%zu", for size_t.
  Repair more format strings.
  Fix a bunch of format string errors reported by Larry.
  Fix some HDfprintf compilation errors: use the right format strings ("zu", PRIuHSIZE), avoid casting some printf arguments, pass the right number of arguments.
  Test the format string "ll" before "l", "L", and "q", like the ./configure script does.  This ought to fix the compilation failure in test/dt_arith.c that Allen told me about:
  Cast a non-void pointer to void pointer for "%p".
  Use PRIu32 and "zu" formats.  Delete some casts from `size_t`.
  I'm taking a guess that this code intended to point the 2-digit wide hexadecimal octet values, not 2 character-wide pointers to the bytes.  The %02p format, which is a GNU-ism, disagreed with GCC 8.3.0 and the option flags we use.
  %08p is not portable, it's a GNU-ism.  Use %8p, instead.  Squashes a GCC error.
  Add format string macros PRI[doxX]HID for hid_t and use PRIdHID.
  Use HDva_copy() and introduce a bunch of compatbility format-string constants for uppercase hexadecimal strings, `PRIX...`.  Should fix the VS2010 errors that Allen mentioned:
  Always #define HDfprintf as fprintf in this header.  I believe this will fix the Windows build error that Allen reported.
  Provide an HDvasprintf implementation only if it isn't #defined.  This should fix the mingw compilation issue that Allen reported.
  Fix va_list usage in the vasprintf(3) implementation.
  Promote format-string warnings to errors.
  Use the portable `-eq` operator instead of the bash-ism `==`. Fixes the tests on NetBSD, where /bin/sh != bash.
  Restore a literal percent sign ("%%") that I accidentally deleted.
  Fix code that made GCC complain about a NULL or `unsigned char *` arguments for "%s".
  Take pains to provide UINT64_MAX in all conditions.
  Correct a couple of format strings.
  ...
2020-09-28 14:42:18 -05:00
David Young
08034972bc Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-27 15:03:44 -05:00
Allen Byrne
ff0881f35b OESS-98 merge with clang-format changes 2020-09-25 16:43:57 -05:00
Allen Byrne
aa08db839e Merge pull request #2882 in HDFFV/hdf5 from ~BYRN/hdf5_adb:feature/cmakeV2-clang-format to develop
* commit '571a5e9250ca69adb54ef956361a5cf77059f67c':
  Add h5ls test plugin format target
  Fix manifest
  Add code owners file
  Update actions - split push/pull-request commits
  Change to executable
  Change to based on LLVM format
  Fix comment formatting due to tabs conversion
  Disable formatting for file
  File changes to affect formatting
  CMake and script changes for clang-format
2020-09-25 16:11:52 -05:00
David Young
5f0bb85813 Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-25 15:34:39 -05:00
Allen Byrne
a117ac6cae Fix comment formatting due to tabs conversion 2020-09-24 09:57:21 -05:00
Jordan Henderson
ce0f87fb35 Add H5Ssel_iter_init API call to reset a selection iterator 2020-09-18 00:12:37 -05:00
Allen Byrne
d8d17d2328 File changes to affect formatting 2020-09-04 16:51:30 -05:00
Allen Byrne
30c7264c2c CMake and script changes for clang-format 2020-09-04 16:36:52 -05:00
David Young
d85cd245d2 Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment 2020-09-03 16:13:47 -05:00
Dana Robinson
3d7a0dc6d5 Merge branch 'develop' into develop_minor 2020-08-27 10:36:03 -07:00
Larry Knox
3f5382bb62 Merge pull request #2795 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr2020:hdf5_bmr2020_addrsani to develop
* commit '5352b1dbc92313d91d3502dd8352352abe8749a7':
  Fixed typo
  Fix HDFFV-11101
2020-08-18 08:03:29 -05:00
Dana Robinson
f4d03432a4 Removes inappropriate file locking call 2020-08-18 05:53:33 -07:00
Binh-Minh Ribler
5bb893a2c2 Fix HDFFV-11101
Description
    Added initialization to local structs in the src function
    H5MF_settle_raw_data_fsm() and the test function test_bt2_hdr_fd()
    to prevent the following error in two different occurrences:
        MemorySanitizer: use-of-uninitialized-value
Platforms tested:
    Linux/64 (jelly)
    Linux/64 (platypus)
2020-08-17 17:51:15 -05:00
Dana Robinson
f02ced7e74 Moves lock flag to H5F_shared_t and adds test. 2020-08-17 14:25:04 -07:00
Dana Robinson
b2d917437d Minor refactoring based on 1.10 normalization work 2020-08-17 09:12:59 -07:00
John Mainzer
5d8c5849e5 Merge pull request #2769 in HDFFV/hdf5 from mdc_sl_opt to develop
* commit 'd00bab96fb4da12a18b5de528c96469978c4c927':
  Minor copy edits to comments -- no code changes.
  Tab to space conversions.
  When flushing, the metadata cache attempts to flush entries in increasing address order.  To facilitate this, the metadata cache needs a list of of dirty entries in increasing address order.  This is implemented via a skip list of all dirty entries in the cache.
2020-08-17 08:25:05 -05:00
Binh-Minh Ribler
24c23c79d8 Merge pull request #2771 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr:hdf5_bmr_HDFFV-10933 to develop
Fixed HDFFV-10933

* commit '16349c5fddce8a74644e18d01d7ea8186aaaa255':
  Fixed HDFFV-10933
2020-08-16 15:34:18 -05:00
mainzer
7b9f61c157 Merge branch 'develop' into mdc_sl_opt 2020-08-15 17:53:29 -05:00
Dana Robinson
c5b1765940 Trivialities noticed while merging things to 1.10 2020-08-15 07:32:50 -07:00
Binh-Minh Ribler
16349c5fdd Fixed HDFFV-10933
Description:
    Updated the original fix by Kent Y. in commit
        200a77d8c3
    - used internal functions instead of public API
    - moved some code into the subroutine for a cleaner look.
    - added test to dsets.c
Platforms tested:
    Linux/64 (jelly)
2020-08-14 14:49:42 -05:00
mainzer
12bb6d7665 Tab to space conversions.
Re-applied tab to space conversions accidentally reverted in the
commit of the metadata cache skip list optimization, and performed
some additional tab to space conversions in passing.

Tested parallel / debug on Jelly.
2020-08-14 12:16:47 -05:00
Quincey Koziol
cb5de74ac2 Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging 2020-08-13 19:03:16 -05:00
Quincey Koziol
4f9542c332 Merge pull request #2739 in HDFFV/hdf5 from namespace_cleanup_01 to develop
* commit '3f46a380e084d83a84783383bdfbbd9a443e9f27':
  Correct typos w/HGOTO_DONE & HGOTO_ERROR
  Move H5T_vlen_reclaim to package scope
  Switch H5VM inline routines back to single underscope and put a comment in their header about this naming
  Clean up private / package / static namespace issues (function naming, which 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.
2020-08-13 19:00:56 -05:00
Dana Robinson
b806f3e9ac Tweak to hide unused threadsafe callback in non-threadsafe builds 2020-08-13 10:13:18 -07:00
mainzer
3202416936 Merge branch 'develop' into mdc_sl_opt 2020-08-13 11:31:16 -05:00
Dana Robinson
04b24163f7 Cleans warnings and cruft from ttsafe_attr_vlen.c 2020-08-12 15:21:38 -07:00
Dana Robinson
037bad4f72 Fixes Windows issues due to exposed pthread code 2020-08-12 15:07:15 -07:00
Dana Robinson
4f0283db78 Fixes a size mismatch when copying old-style to new-style references 2020-08-12 11:38:04 -07:00
Dana Robinson
ed51c0e302 Fixes memory leads in trefer.c 2020-08-12 09:52:10 -07:00
Quincey Koziol
f2681e36ae Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging 2020-08-12 11:17:52 -05:00
Quincey Koziol
3f46a380e0 Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-12 11:17:27 -05:00
Dana Robinson
dca1733238 Merge pull request #2752 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit '78c6be05a84f854074a4df2e10c15a56444e4015':
  Fixes the splitter VFD test on Windows.
2020-08-12 08:03:11 -05:00
Dana Robinson
78c6be05a8 Fixes the splitter VFD test on Windows. 2020-08-11 17:46:54 -07:00
Quincey Koziol
c48d1b0ff4 Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging 2020-08-10 13:15:13 -05:00
Quincey Koziol
98c184e130 Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-10 13:14:02 -05:00
Quincey Koziol
e1a7a1acbe Remove redundant calls to set the metadata cache tag 2020-08-08 08:44:34 -05:00
Dana Robinson
0ed6534603 Fixes flock Windows failure 2020-08-07 12:40:04 -07:00
Quincey Koziol
a2340cec3b Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01 2020-08-07 10:06:34 -05:00
Dana Robinson
5ce2a17804 Removes staff email addresses from the repository
Removes redundant C library headers from hl library
2020-08-06 17:58:07 -07:00
Dana Robinson
72363de1c0 Merge pull request #2730 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:file_locking_squash_2 to develop
* commit '47ad0ac7237b464e939fe54dd129a151944d9706':
  Renames BEST-EFFORT to BEST_EFFORT for file locking env var
  Updated the file locking Fortran property list wrappers and added a test.
  Fixed missing parens in VFDs
  Minor change to header comments in file locking C++ changes.
  Squash merge of file locking fixes
2020-08-06 18:31:41 -05:00