Matt L 355f67ac37 Close datatype IDs derived from memory type in the JNI translation helpers (#6594)
* Close datatype IDs derived from the memory type in the JNI translate helpers

The object-tree read/write helpers in h5util.c derive a base datatype from
the memory type with H5Tget_super() for the variable-length, array and
complex classes, but never closed it. Because an hid_t is not reclaimed when
the native method returns, every read or write of such data leaked at least
one datatype ID for the lifetime of the process, and nested types leaked
one per level.

This PR updates the helpers to close the derived type in their done: blocks,
which covers both the success and the error paths, and to reset the id in the
compound loops to avoid the potential for double closes.

It also has the helpers release the class references that the per-element
helpers look up on entry. These are local references, so they were reclaimed
when the enclosing native method returned, but a compound read calls the helper
once per member per element and held one set per call until then. Releasing
them at the single exit bounds the count of references to the recursion depth.

* Add CHANGELOG entry for the JNI datatype ID leak fix

* Restrict the derived datatype close guards to strictly positive IDs

hid_t 0 is not a valid datatype ID, so H5Tclose(0) would fail.

* Revert "Restrict the derived datatype close guards to strictly positive IDs"

An hid_t of 0 not being a valid ID is a property of the current H5I
encoding rather than a documented guarantee, so the JNI helpers should
not depend on it.
2026-09-11 09:59:03 -05:00
2025-10-06 16:35:59 -05:00
2026-08-25 09:02:32 -07:00
2026-09-02 11:20:18 -05:00
2026-01-21 23:02:49 -06:00
2024-05-23 16:44:33 -05:00

HDF5 Logo

BSD DOI MIME Type develop cmake build status OpenSSF Best Practices


What is HDF5?

This repository contains a high-performance library's source code and a file format specification that implements the HDF5® data model. The model has been adopted across many industries, and this implementation has become a de facto data management standard in science, engineering, and research communities worldwide.

The HDF Group is the developer, maintainer, and steward of HDF5 software. Find more information about The HDF Group, the HDF5 Community, and other HDF5 software projects, tools, and services at The HDF Group's website.

Quick Start

  • New to HDF5? Start with the INSTALL.md guide for compilation and installation instructions.

  • Ready to build? See INSTALL_CMake.md for CMake-based builds.

  • Running on HPC? Check out README_HPC.md for parallel HDF5 configuration.

Table of Contents

Documentation

Documentation for all HDF software is available at:

See the CHANGELOG.md file in the release_docs/ directory for information specific to the features and updates included in this release of the library.

Platform-Specific Guides

Several files in the docs/ directory provide platform-specific details:

File Description
INSTALL General compilation and installation instructions (start here)
INSTALL_CMake.md Building with CMake
README_HPC.md Building and configuring Parallel HDF5 on HPC systems
INSTALL_Windows.md Windows installation
INSTALL_Cygwin.md Cygwin installation
USING_HDF5_CMake.md Building HDF5 applications with CMake
USING_CMake_Examples.md Building and testing HDF5 examples with CMake

Help and Support

The HDF Group staffs a free Help Desk accessible at https://help.hdfgroup.org and also monitors the Forum. Our free support service is community-based and handled as time allows. We'll do our best to respond to your question as soon as possible, but please note that response times may vary depending on the complexity of the issue and staff availability.

If you're interested in guaranteed response and resolution times, a dedicated technical account manager, and more benefits (all while supporting the open-source work of The HDF Group), please check out Priority Support.

Forum and News

The HDF Forum is provided for public announcements, technical questions, and discussions of interest to the general HDF5 Community.

These forums are provided as an open and public service for searching and reading. Posting requires completing a simple registration and allows one to join in the conversation. Please read the quickstart guide for more information on how to get started.

Release Schedule

HDF5 release schedule

HDF5 does not follow a regular release schedule. Instead, updates are based on the introduction of new features and the resolution of bugs. However, we aim to have at least one annual release for each maintenance branch. The chart above shows past HDF5 releases that have reached end of life (EOL).

Release Progress

The badges below track the release currently in development.

Next Release

Latest Release

Critical Priority

High Priority

Medium Priority

Low Priority

The Next Release badge shows the in-development version (derived from H5_VERS_MAJOR/H5_VERS_MINOR in src/H5public.h), annotated with the target due date of the matching GitHub milestone when one is set. The Latest Release badge shows the most recently published release in that same major series, with its release date. The badges below them show the current progress of critical, high, medium, and low priority issues for the in-development release, with colors that reflect completion status:

  • 🟢 Green (90%+): Readying for Deployment - most issues completed
  • 🟡 Yellow (60-89%): Nearing Completion - on track for release
  • 🟠 Orange (40-59%): In Development - attention needed
  • 🔴 Red (<40%): Initial Phase - significant issues remain

Click the badges to view the detailed project board with current release items.

Downloads and Source Code

Snapshots and Releases

HPC Testing Results

View HPC configure/build/test results on CDash

Java Maven Artifacts

HDF5 Java bindings and examples are available as Maven artifacts. For detailed usage instructions including dependency configuration, repository setup, and platform-specific builds, see HDF5Examples/JAVA/README-MAVEN.md.

Contributing

We welcome contributions to HDF5! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.

How to Contribute

  1. Report Issues: Use our GitHub Issues to report bugs or request features
  2. Submit Pull Requests: Fork the repository, make your changes, and submit a PR
  3. Join Discussions: Participate in the HDF Forum

For detailed contribution guidelines, please contact us through the Help Desk.

How to Cite HDF5

If you use HDF5 in your research, please cite it. This repository includes a CITATION.cff file containing standard citation metadata.

Quick DOI: 10.5281/zenodo.17808558

Build Status

Click to expand detailed build status

Continuous Integration

HDF5 develop daily build status CVE regression OSS-Fuzz Status Link Checker Status

Integration Testing

HDF-EOS5 build status netCDF build status h5py build status

HDF5 filter plugins testing

HDF5 plugins testing

VOL and VFD Testing

HDF5 VOL connectors build status HDF5 VFD build status


S
Description
No description provided
Readme Cite this repository
966 MiB
Languages
C 76.4%
Java 9%
Fortran 5.2%
CMake 3.1%
HTML 2.2%
Other 4%