<pre style='margin:0'>
Ryan Carsten Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/592739c6867e902c4aa8d50a8187c0cfdbc3d0d0">https://github.com/macports/macports-ports/commit/592739c6867e902c4aa8d50a8187c0cfdbc3d0d0</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 592739c6867 hdf5: Fix leak of internal IDs
</span>592739c6867 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 592739c6867e902c4aa8d50a8187c0cfdbc3d0d0
</span>Author: Ryan Carsten Schmidt <ryandesign@macports.org>
AuthorDate: Thu May 9 00:43:43 2024 -0500
<span style='display:block; white-space:pre;color:#404040;'> hdf5: Fix leak of internal IDs
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://trac.macports.org/ticket/69938
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Also clean up fetch and extract code.
</span>---
science/hdf5/Portfile | 21 ++----
science/hdf5/files/fix-leak-of-internal-ids.patch | 80 +++++++++++++++++++++++
2 files changed, 87 insertions(+), 14 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/hdf5/Portfile b/science/hdf5/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index e5f5c37e4a1..efefa2320fd 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/science/hdf5/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/hdf5/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -9,8 +9,8 @@ PortGroup github 1.0
</span>
github.setup HDFGroup hdf5 1.14.4.2 hdf5_
set distversion 1.14.4-2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#set mainversion [lrange [split ${version} -] 0 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#set mainversion [lindex [split ${distversion} -] 0]
</span> #set shortversion [join [lrange [split ${mainversion} .] 0 1] .]
categories science
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -18,6 +18,7 @@ maintainers {eborisch @eborisch} openmaintainer
</span>
description HDF5 general purpose library and file format for storing\
scientific data
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> long_description HDF5 is a data model, library, and file format for storing\
and managing data. It supports an unlimited variety of\
datatypes, and is designed for flexible and efficient I/O\
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -26,19 +27,10 @@ long_description HDF5 is a data model, library, and file format for storing\
</span> of HDF5. The HDF5 Technology suite includes tools and\
applications for managing, manipulating, viewing, and\
analyzing data in the HDF5 format.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-homepage https://www.hdfgroup.org/solutions/hdf5/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms darwin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Looks like upstream gave up on BZ2. Maybe they will restore it later.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-distfiles ${name}-${distversion}.tar.gz
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#distfiles ${name}-${version}.tar.bz2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#use_bzip2 yes
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Github download assets path is not quite right, for some unknown reason.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-master_sites ${github.homepage}/releases/download/${git.branch}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-## Full target currently:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-## https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.4.2/hdf5-1.14.4-2.tar.gz
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://www.hdfgroup.org/solutions/hdf5/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.tarball_from releases
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distname ${name}-${distversion}
</span>
checksums \
rmd160 da80b0fcf47248e869da9112890edf79905bf95c \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -51,6 +43,7 @@ depends_lib port:zlib port:libaec
</span> use_parallel_build yes
patchfiles patch-tools-src-misc-h5cc.in.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append fix-leak-of-internal-ids.patch
</span>
# llvm-gcc-4.2 produced code fails type conversion tests
# Upstream suggestion is use -O0. Clang-produced code passes all tests.
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/hdf5/files/fix-leak-of-internal-ids.patch b/science/hdf5/files/fix-leak-of-internal-ids.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..1d537ce13fe
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/hdf5/files/fix-leak-of-internal-ids.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,80 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fix leak of internal IDs registered during compound datatype conversion.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Allegedly fixes segfault after running h5py test suite.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/h5py/h5py/issues/2419
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/HDFGroup/hdf5/pull/4459
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/H5T.c.orig 2024-04-15 14:47:31.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/H5T.c 2024-05-09 00:36:32.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1643,9 +1643,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FUNC_ENTER_PACKAGE_NOERR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assert(dt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- assert(dt->shared);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (H5T_STATE_IMMUTABLE == dt->shared->state) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (dt->shared && (H5T_STATE_IMMUTABLE == dt->shared->state)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dt->shared->state = H5T_STATE_RDONLY;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (*n)++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } /* end if */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1862,7 +1861,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Sanity check */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assert(dt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- assert(dt->shared);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* If this datatype is VOL-managed (i.e.: has a VOL object),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * close it through the VOL connector.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4162,10 +4160,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FUNC_ENTER_NOAPI(FAIL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Sanity check */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- assert(dt && dt->shared);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ assert(dt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Clean up resources, depending on shared state */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (dt->shared->state != H5T_STATE_OPEN) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (dt->shared && (dt->shared->state != H5T_STATE_OPEN)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (H5T__free(dt) < 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4202,10 +4200,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Sanity check */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assert(dt);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- assert(dt->shared);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Named datatype cleanups */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (dt->shared->state == H5T_STATE_OPEN) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (dt->shared && (dt->shared->state == H5T_STATE_OPEN)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Decrement refcount count on open named datatype */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dt->shared->fo_count--;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/H5Tconv.c.orig 2024-04-15 14:47:31.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/H5Tconv.c 2024-05-09 00:37:43.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2241,6 +2241,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (need_ids) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ hid_t tid;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (priv->src_memb_id[i] == H5I_INVALID_HID) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((tid = H5I_register(H5I_DATATYPE, priv->src_memb[i], false)) < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ H5T__conv_struct_free(priv);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cdata->priv = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2248,7 +2249,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "can't register ID for source compound member datatype");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ priv->src_memb_id[i] = tid;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (priv->dst_memb_id[src2dst[i]] == H5I_INVALID_HID) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((tid = H5I_register(H5I_DATATYPE, priv->dst_memb[src2dst[i]], false)) < 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ H5T__conv_struct_free(priv);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cdata->priv = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2256,6 +2259,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "can't register ID for destination compound member datatype");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ priv->dst_memb_id[src2dst[i]] = tid;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } /* end if */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } /* end for */
</span></pre><pre style='margin:0'>
</pre>