Commit Graph
4249 Commits
Author SHA1 Message Date
jhendersonHDF 2952bb9216 Mark several CMake variables as advanced (#6321) 2026-03-27 11:30:23 -05:00
jhendersonHDF 0c734cbe80 Fix cache image testing issues and re-enable testing (#6311)
Fix issue where chunked datasets could get setup with an incorrect
chunking index type in parallel HDF5

Fix issue where metadata cache images with an undefined address
and size of 0 couldn't be properly decoded

Fix issue where a flag in H5Cimage.c wasn't getting set correctly
for release builds of the library, leading to incorrect error
checking when reconstructing metadata cache entries
2026-03-27 11:29:18 -05:00
phfix 1dda3c51ad test/cache_api: avoid false rpt_fcn pointer mismatch on Windows (#6274)
* test: avoid false function-pointer mismatch for rpt_fcn on Windows
* test: relax rpt_fcn comparison for MinGW
2026-03-10 16:14:46 -05:00
Scot Breitenfeld 322b30b6e8 Fix POSIX header guard to include _WIN32 for Intel icx on Windows (#6244)
Intel's icx compiler defines _WIN32 (with underscore) but not WIN32,
causing unistd.h and other POSIX headers to be incorrectly included
on Windows builds.
2026-03-01 07:19:05 -06:00
Guido Imperiale b074586d9e Apply filters to variable-length data (#6178)
Closes can_apply and set_local filter callbacks skipped for H5T_VARIABLE dtypes #5942. A more detailed explanation of the rationale for this PR is in the linked issue.

Mandatory filters can be now applied to variable-length data. This notably includes h5py object strings and NpyStrings.

Optional filters applied to variable-length data no longer skip can_apply and set_local, only to jump directly to filter. This fixes hdf5_blosc and HDF5_Blosc2, which rely on set_local. Note that all filters which have neither can_apply nor set_local have always worked fine with vlen data, as long as they were tagged as optional. Notable examples are deflate, lzf, bzip2 (from hdf5plugin), and lz4 (also from hdf5plugin).

Lossy filters, such as scale-offset, are and remain untested and most likely broken, as I expect them to treat the vlen metadata as numbers and corrupt it. The right place to ensure proper behaviour is their can_apply function, which however is broken (filters: can_apply does nothing for optional filters #6161).
2026-02-24 17:05:58 -06:00
Martin Diehl fd72abbbbc Consistent extension for C++ (#6214)
Except for this file, all use cpp instead of cxx. No obvious reason why
the same file types should have different extensions.
2026-02-20 08:59:27 -06:00
Julien Schueller d58638be09 CMake: Fix Fortran cross-compilation support
Refactor the cross-compilation infrastructure to rely on the standard
CMAKE_CROSSCOMPILING_EMULATOR variable instead of the custom
CROSSCOMPILING_PATH environment hack.

Key changes:
- Removed `ENVIRONMENT "${CROSSCOMPILING_PATH}"` from all test definitions.
- Updated custom commands (e.g., H5match_types, H5_gen) to invoke the
  emulator explicitly when cross-compiling.
- Updated ConfigureChecks.cmake and HDF5UseFortran.cmake to enable
  `try_run` checks when an emulator is defined.
- Added config/toolchain/mingw-w64-x86-64-wine.sh wrapper to automatically
  locate MinGW runtime libraries (like libgfortran) for Wine execution.
- Cleaned up toolchain files to remove hardcoded emulator paths, deferring
  configuration to the build environment.
2026-02-13 14:45:02 -06:00
bmribler 9268b803b7 Fixes buffer underflow (#6143)
Fixes security issue by treating non-NULL buffer with size 0 as length-only query in get_name API functions.

Behavior:
Modify get_name API functions to treat (buffer != NULL, size == 0) as length-only queries, preventing undefined behavior.
Fix applied to H5Aget_name, H5Aget_name_by_idx, H5Fget_name, H5Gget_objname_by_idx, H5Iget_name, H5Lget_name_by_idx, H5Rget_file_name, H5Rget_obj_name, H5Rget_attr_name, and 8 other functions.
Tests:
Update test/links.c, test/tattr.c, test/tfile.c, test/titerate.c, and test/trefer.c to verify new behavior with non-null buffer and size 0.
Documentation:
Update comments in H5A.c, H5F.c, H5Gdeprec.c, H5I.c, H5L.c, H5R.c, and H5Rdeprec.c to reflect new behavior.t]@users.noreply.github.com>
2026-01-26 18:07:23 -06:00
jhendersonHDF ed5eceab58 Enable data sieving for chunks that can't be cached (#6111)
* Enable data sieving for chunks that can't be cached

Fixed an issue that prevented use of a data sieve buffer for I/O on dataset
chunks when those chunks couldn't be cached by the library. This issue
could result in worst-case behavior of I/O on a single data element at a
time when chunks are non-contiguous with respect to memory layout.

Added a test to attempt to catch performance regressions in I/O on dataset
chunks that are non-contiguous with respect to memory layout

Updated the External File List logic to set the data sieve buffer size to
the smaller of the dataset size and the size set in the FAPL, similar to
the logic elsewhere in the library
2026-01-23 10:58:11 -06:00
efferre79 476c60961c the targets interface should support HDF5_INSTALL_INCLUDE_DIR (#6142) 2026-01-13 10:27:38 -06:00
jhendersonHDF d1efeba7be Add predefined datatype for FP4 format (#6122)
Adds predefined datatype for FP4 data in E2M1 format

Does not add support for any native FP4 types; datatype conversions are performed in software
2025-12-31 11:44:08 -06:00
jhendersonHDF 441d83a896 Add predefined datatypes for FP6 formats (#6097)
Adds predefined datatypes for FP6 data in E2M3 and E3M2 formats

Does not add support for any native FP6 types; datatype conversions are performed in software
2025-12-19 12:56:54 -06:00
Matt L 63c3abd7db Fix zero-element reads on virtual dsets with r-trees (#6083)
Fix zero-element read failure in H5D__virtual_read() and H5D__virtual_write() in H5Dvirtual.c by skipping H5S_SELECT_BOUNDS if nelmts is 0.

Add test_vds_empty_slice() in rtree.c to verify zero-element read behavior on virtual datasets with r-trees.
2025-12-12 09:24:09 -06:00
H. Joe Lee 8334e1395e build(haiku): make chunk_dims static in test/istore.c (#6049)
* fix: remove unused variable "zero"
2025-12-01 13:16:51 -06:00
jhendersonHDF bd9e443e82 Fix checking of HDF5_VOL_CONNECTOR env. var. in some tests (#6073) 2025-12-01 11:21:19 -06:00
jhendersonHDF 765f35cc81 Fix several issues uncovered by CVE-2025-7067 (#5938)
Fixes CVE-2025-7067 issues by updating H5FS_sect_add to handle section merging/shrinking and improving error handling.
2025-11-11 11:52:20 -06:00
H. Joe Lee c25e87f685 Make test/evict_on_close.c FILENAMES static (#5989)
close #5988
2025-11-07 11:51:12 -06:00
Neil Fortner 1093a18c18 Add support for 64 bit chunks, including 64 bit chunk dimensions (#5965)
Various related changes, including refactoring part of dataset creation, and reworking how layout versions are calculated.

Needs more testing of filters that create very large chunks, but that will need code to turn it off in cases where we can't allocate >4GiB buffers. I tested this manually by increasing the expansion ration in the expand2 test in dsets, and it passed everything up until it tried to expand the datasets with H5Dset_extent() and my laptop ran out of disk space.

We should add code and testing to handle the case where the "size of size" is set less than 8 bytes. This is not a new issue, since it can be set to 2.

I will file issues for these, but I don't think they are necessary for the release.
2025-11-04 11:42:24 -06:00
Larry Knox c4ed50d000 Semantic versioning update (#5944)
* Add instruction to verify library version compliance with sematic
versioning with link to semantic versioning wiki page.
Update H5.c and version tests for move of major and minor versions to
1st and 2nd version numbers.

* WILL_FAIL for the tcheck_version doesn't need changing for release
branches - removed that instruction from RELEASE_PROCESS.
Change release version instructions to use x.y.z.1 for pre-release
instead of x.y.z-1 as for develop snapshots.
2025-11-04 05:11:46 -06:00
jhendersonHDF eb72e67ed2 Add predefined datatypes for FP8 formats (#5882)
Adds predefined datatypes for FP8 data in E4M3 and E5M2 formats

Does not add support for any native FP8 types; datatype conversions are performed in software
2025-11-03 15:10:22 -06:00
Neil Fortner 85f7f8f083 Change default nslots value for chunk cache to 8191 (#5956)
In order to reduce hash collisions and take advantage of modern memory capacity, the default hash table size for the chunk cache has been increased from 521 to 8191. This means the hash table will consume approximately 64 KiB per open dataset. This value can be changed with H5Pset_cache() or H5Pset_chunk_cache(). This value was chosen because it is a prime number close to 8K.
2025-10-31 14:48:05 -05:00
Neil Fortnerandgithub-actions 0441a4b702 Allow use of filters that expand chunks by a large factor (#5939)
* Change new chunk indexing methods to always encode chunk size as a 64
bit (size of lengths) integer, when using the 2.0 file format.

* Add CHANGELOG.md note

* Spelling

* Fix errors in parallel build

* Committing clang-format changes

* More parallel fixes.

* Committing clang-format changes

* Another parallel fix

* Fix parallel for real this time I hope

* Update function descriptions in dsets.c

* Fix spelling

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-30 17:24:33 -05:00
Neil Fortner 5e03b3a315 Change default file format to 1.8 (#5949)
Change default file format to 1.8 across various tests and examples, updating file creation and access logic accordingly.

Behavior:
Default file format version changed to 1.8 in H5Pfapl.c.
Updated file creation and access to use 1.8 format in h5ex_g_compact.c and test_file_image.c.
Set earliest file format in multiple test files including cache_tagging.c, dtypes.c, and links.c.
Tests:
Modified expected output in tools/test/misc/expected/*.ls files to reflect new file format locations.
Adjusted test logic in test_file_image.c and cache_tagging.c to accommodate format changes.
Misc:
Added comments and TODOs for future format testing in test_file_image.c.
Minor variable renaming for clarity in test_file_image.c.
2025-10-30 15:26:12 -05:00
Matt L f981c9c9be Make rtree test VFD-compatible (#5933)
Implement the special filename handling that makes the rtree test compatible with the family VFD (and any other VFD that changes how filenames are treated).

Make rtree.c test VFD-compatible by implementing dynamic filename handling and updating function signatures for file access property lists.
2025-10-22 22:01:38 -05:00
Allen Byrne fb35cde24a Rework Fortran configure to allow cross compile overrides (#5720)
Behavior:
Modify HDF5UseFortran.cmake to handle cross-compilation by providing default KINDs and sizes when CMAKE_CROSSCOMPILING is true.
Default values for INTEGER and REAL KINDs and their sizes are set when cross-compiling.
Error messages are adjusted to reflect cross-compilation scenarios.
Logic:
Conditional checks added for CMAKE_CROSSCOMPILING to determine if default values should be used.
Default values include INTEGER KINDs {1,2,4,8,16} and REAL KINDs {4,8,10,16}.
Default sizes for native kinds are set to 4 for INTEGER and REAL, and 8 for DOUBLE PRECISION when cross-compiling.
Misc:
Adjustments to verbose messages to indicate when defaults are used during cross-compilation.
2025-10-12 17:30:46 -05:00
Matt L ac169ed3e8 Optimize VDS operations with r-tree (#5843)
Optimize VDS operations using R-tree spatial index, adding new API functions and tests for improved performance.

Behavior:
Introduces R-tree spatial index for optimizing VDS operations in H5Dvirtual.c.
Adds H5Pset_dset_use_spatial_tree() and H5Pget_dset_use_spatial_tree() to control R-tree usage.
Default behavior uses R-tree for VDS with more than 1000 mappings.
Implementation:
Adds H5RT.c, H5RTprivate.h, and H5RTpkg.h for R-tree implementation.
Updates H5Pdapl.c and H5Pdcpl.c to include R-tree properties.
Modifies H5Dvirtual.c to integrate R-tree in VDS I/O operations.
Testing:
Adds rtree.c for testing R-tree creation, search, and copy operations.
Tests R-tree integration with VDS in test/dsets.c.
Verifies R-tree behavior with different dataset access property list settings.
2025-10-07 12:13:28 -05:00
Matt L ac5d52536d Add internal spatial tree (#5800)
Implement an r-tree data structure in a new module. It has three exposed methods:  H5RT_create(), H5RT_search(), and H5RT_free().

The STR algorithm used during creation is based on the one described here.

Updates CMakeLists.txt to include H5RT.c and related headers.

Adds rtree.c test file to validate R-tree creation and search functionalities.
2025-10-02 06:49:52 -05:00
Neil Fortner a28946186b Fix bugs involving recursive link operations that could be triggered by deleting links to their parent group (#5853)
Fix problems that could occur when deleting an object header message inside a recursive operation during object header message traversal.
2025-09-30 12:20:49 -05:00
jhendersonHDF 748875a7d7 Add predefined datatypes for bfloat16 data (#5402)
Adds predefined datatypes for little- and big-endian bfloat16 data

Does not add support for any native bfloat16 types; datatype conversions are performed in software

Also adds missing float16 predefined types to fortran
2025-09-26 13:33:56 -05:00
jhendersonHDF 07c2dca003 Skip unicode tests for specific VFDs (#5823)
During testing, specific VFDs create files with names that
are different than the "base" filename passed to H5Fcreate().
The unicode tests are setup to expect specific filenames, so
these tests are skipped when the test utility function
h5_fixname() would modify the "base" filename.
2025-09-15 11:42:54 -05:00
jhendersonHDF 7461a98cb2 Revise approach to Unicode filenames on Windows (#5794)
Treat filenames as UTF-8 initially and fall back to ANSI functions
if conversion to UTF-16 fails

Adds new HDF5_PREFER_WINDOWS_CODE_PAGE environment variable to
prefer interpreting filenames according to the active Windows code
page rather than assuming UTF-8 encoding
2025-09-11 16:50:31 -05:00
jhendersonHDF b21c848829 Remove unused variables in test (#5808)
Fixes several warnings in Developer builds about variables declared past the start of the function
2025-09-11 14:56:42 -05:00
Matt L 5ce77b3fea Separate test file generation from testing in external link reference test (#5760)
Move the portion of test_reference_external() in charge of test file creation to its own dedicated function. This will eventually be helpful if/when we change the test file creation here to used a shared routine.
2025-09-03 22:47:48 -05:00
Allen Byrne 63803d7115 allow better CMake version testing (#5727)
* add cmake latest workflow with lukka/get-cmake@latest
* Upgrade minimum CMake version to 3.26
2025-08-23 06:43:20 -05:00
Matt L 99a3e84532 Fix Family VFD filename conflict in tests (#5673) 2025-08-14 07:58:39 -05:00
Allen Byrne 497b65ad0f Add file header comments to CMake files (#5688) 2025-08-13 07:19:57 -05:00
Neil Fortner be306608d4 Change default page buffer size to 64MiB when using ROS3 driver (#5685)
* H5FDset_fapl_ros3() sets page buffer size to 64MB by default. Added
H5F_PAGE_BUFFER_SIZE_DEFAULT macro indicating the page buffer size
setting is the default, and associated machinery and tests.
2025-08-06 23:04:10 -05:00
bc9914d2f0 Optimizations for repeated VDS source file and dataset names (#5640)
Add hash tables for detecting repeated source file and dataset names.
Share these repeated strings between mappings in memory. Add new
encoding format for VDS for shared names. Add tests and documentation
for these changes.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Larson <matthewjlar@gmail.com>
2025-07-16 09:23:59 -05:00
H. Joe Lee 434b94c1b3 chore: decapitalize Fixed Array (#5659)
close #5658
2025-07-15 18:20:13 +02:00
H. Joe Lee 519bb41b7b Remove 1 hour timeout limit for objcopy test (#5648) 2025-07-07 07:38:11 -05:00
Matt L 3b054fe7cc Always build test generators (#5622) 2025-06-23 07:47:05 -05:00
Matt L 68bf564886 Delay dataset layout copy to DCPL (#5537) 2025-06-20 11:02:55 -05:00
0743df227f Add documentation and s3proxy testing for ROS3 VFD (#5560)
Adds workflow to build ROS3 VFD and optionally build aws-c-s3 library
from source or use package managers

Adds testing of ROS3 VFD with s3proxy and docker

Adds new H5Pset_fapl_ros3_endpoint()/H5Pget_fapl_ros3_endpoint() API
functions to set/get an alternative endpoint URL to use when opening
files with the ROS3 VFD

Cleans up warnings in tools and tests related to ROS3 VFD structure size

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
2025-06-19 16:22:49 -05:00
Neil Fortner 1ca48703e3 Add H5Dread_chunk2() (#5506) 2025-06-17 11:11:13 -05:00
75fff3ed06 Re-write ROS3 VFD S3 backend to use AWS' C S3 library (#5548)
* Re-write ROS3 VFD S3 backend to use AWS' C S3 library

Replaces the ROS3 VFD's libcurl-based S3 backend with a new
backend which uses the aws-c-s3 library

Adds support for sourcing credentials from standard AWS
configuration files, environment variables, etc. with a
fallback to anonymous credentials when credentials can't be
found

Adds support for sourcing AWS region from standard AWS
configuration files and environment variables

Adds support for new environment variables HDF5_ROS3_VFD_DEBUG,
HDF5_ROS3_VFD_LOG_LEVEL and HDF5_ROS3_VFD_LOG_FILE for debugging
purposes

Replaces function to load testing credentials in the ros3.c and
s3comms.c tests with new function that delegates to the aws-c-s3
library for better compatibility with standard AWS configuration
files and environment variables

Adds support for s3:// object URIs

Adds HTTP User-Agent header in form of
'libhdf5/<hdf5_version> (vfd:ros3) libaws-c-s3'

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
2025-05-29 17:51:29 -05:00
Dana Robinsonandgithub-actions d9f5f5020c Refactor warning macros (#5432)
* Refactor warning macros

Replaces the scheme in H5warnings.h with a more compiler-agnostic
one that relocates ifdef complexity to the warnings header file
and uses better naming.

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-23 11:46:40 -05:00
Matt L 9db58791cd Fix typo in DLS test message (#5534) 2025-05-14 15:29:49 -05:00
Scot Breitenfeld b0a47973d1 update hdf5.github.io links to support.hdfgroup.org (#5530) 2025-05-13 07:45:16 -05:00
Neil Fortner e0dbcebe0d Minor addendums to latest file image fix (#5489) (#5496)
* Enable bitwise comparison of file image in file_image.c for all file
format versions. Add RELEASE.txt note for file image fix with latest
format (#1915).

* Fix error message in file image test.
2025-04-28 13:37:30 -05:00
Neil Fortner abc030a905 Fix issue with H5Fget_file_image() when using newer file formats (#5489)
* Patch superblock checksum of file image when using H5Fget_file_image
* Add assert to (hopefully) prevent this code from going out of date
again.
2025-04-25 15:06:13 -05:00