Repository navigation
Update HDF5 to 2.0 and fix null pointer dereference in tuple impl - #2
Merged
Merged
Conversation
zhexuany
force-pushed
the
update-hdf5-2.0
branch
2 times, most recently
from
January 31, 2026 16:18
3232e3c to
e9181fd
Compare
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # .gitignore # Cargo.toml # hdf5-sys/build.rs # hdf5-types/src/h5type.rs # hdf5/src/hl/datatype.rs
zhexuany
force-pushed
the
update-hdf5-2.0
branch
from
January 31, 2026 16:27
e9181fd to
0c6c4b2
Compare
- Update repository and homepage URLs to archebase/hdf5-rs - Add Archebase Contributors to authors list - Update README badges and links to point to new repository - Add Credits section to acknowledge original authors (Ivan Smirnov, Magnus Ulimoen) - Update MSRV badge and documentation to reflect 1.92 requirement Co-authored-by: Cursor <cursoragent@cursor.com>
Add comprehensive support for HDF5 2.0.0 including: Build System: - Update version parsing regex to accept HDF5 2.x versions - Add cfg flags emission for 2.0.x versions - Update Homebrew search to include HDF5 2.0 Versioned API Bindings: - H5Dread_chunk2 (with new buf_size parameter) - H5Tdecode2 (with new buf_size parameter) - H5Iregister_type2 (hash_size parameter removed) - Deprecated v1 APIs still available for backward compatibility New HDF5 2.0 Types: - H5T_COMPLEX datatype class - Complex number predefined types (H5T_COMPLEX_IEEE_F32LE, etc.) - bfloat16 predefined types (H5T_FLOAT_BFLOAT16LE/BE) - FP8 predefined types (H5T_FLOAT_F8E4M3, H5T_FLOAT_F8E5M2) - H5Tcomplex_create function binding High-Level API: - Add is_complex() method on Datatype (HDF5 2.0.0+) - Handle H5T_COMPLEX class in to_descriptor() Tests: - Comprehensive test suite for HDF5 2.0.0 features - Tests conditionally compiled based on HDF5 version - Both low-level (hdf5-sys) and high-level (hdf5) tests Documentation: - Update README with HDF5 2.0 compatibility info - Update CHANGELOG with new features Co-authored-by: Cursor <cursoragent@cursor.com>
- Update hdf5-src submodule to HDF5 2.0.0 release - Fix build.rs to set CMAKE_DEBUG_POSTFIX for HDF5 2.0 compatibility - Update file driver bindings for HDF5 2.0 (uses global variables instead of init functions) - Update high-level globals.rs to handle both pre-2.0 and 2.0+ file driver initialization patterns - Fix test_get_member_names to sort results (iteration order changed in 2.0) - Remove unnecessary unsafe blocks in HDF5 2.0 tests - Update README and CHANGELOG to reflect bundled HDF5 2.0.0 The bundled HDF5 is now version 2.0.0, enabling all HDF5 2.0 features including complex number datatypes, bfloat16, and FP8 types when using static builds. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
impl_tuple!macro that caused test failuresChanges
Bug Fix: Null Pointer Dereference in
impl_tuple!The
impl_tuple!macro inhdf5-types/src/h5type.rswas using undefined behavior by dereferencing a null pointer to compute field offsets:This caused tests to fail with "null pointer dereference occurred" on recent Rust versions. Fixed by replacing with
std::mem::offset_of!which is safe and stable since Rust 1.77.Warning Fixes
windows_dllcfg registration, lifetime elision warnings inDynValueRuntimeErrorstruct, registered all custom cfg valuesdocrstypo, added explicit lifetimes, suppressed intentional function pointer comparison warningMSRV Update
Updated minimum supported Rust version from 1.64.0 to 1.80.0 to enable
rustc-check-cfgsupport for proper cfg validation.Test plan
cargo testpasses successfully