7948 Commits

Author SHA1 Message Date
jhendersonHDF
37df21707b
Rewrite H5T__path_find_real for clarity (#4225)
* Move conversion path free logic to helper function
2024-03-27 08:07:57 -05:00
Dana Robinson
fc46c83614
Take user block into account when returning chunk addresses (#4236)
Both H5Dchunk_iter() and H5Dget_chunk_info(_by_coord)() did not take
the size of the user block into account when reporting addresses. Since
the #1 use of these functions is to root around in the file for the raw
data, this is kind of a problem.

Fixes GitHub issue #3003
2024-03-25 19:27:14 -07:00
jhendersonHDF
da60238e83
Set DXPL in API context for native VOL attribute I/O calls (#4228) 2024-03-24 22:07:21 -05:00
Dana Robinson
3e9c2a6a5c
Fixed a cache assert with too-large metadata objects (#4231)
If the library tries to load a metadata object that is above the
library's hard-coded limits, the size will trip an assert in debug
builds. In HDF5 1.14.4, this can happen if you create a very large
number of links in an old-style group that uses local heaps.

The library will now emit a normal error when it tries to load a
metadata object that is too large.

Partially addresses GitHub #3762
2024-03-24 22:07:01 -05:00
bmribler
817175e6e3
Fix broken URLs in documentation (#4214)
Fixes GH-3881 partially.  There are pages that need to be recreated.
2024-03-24 15:12:36 -05:00
bmribler
ce8ad65b4f
Fix broken links (#4224) 2024-03-23 22:33:36 -05:00
jhendersonHDF
86ca181bd8
Fix 'make check-vfd' target for Autotools (#4211)
Changes Autotools testing to use HDF5_TEST_DRIVER environment
variable to avoid running tests that don't work well with several
VFDs

Restores old h5_get_vfd_fapl() testing function to setup a FAPL
with a particular VFD

Adds a macro for the default VFD name
2024-03-22 21:31:16 -05:00
bmribler
174c22df22
Summarize the library version table (#4212)
Fixes GH-3773
2024-03-22 11:54:46 -05:00
Glenn Song
02b5204472
Add clarification for current behavior of H5Get_objtype_by_idx() (#4120) 2024-03-22 11:16:01 -05:00
vchoi-hdfgroup
093cca7ae4
Propagate group creation properties to intermediate groups (#4139) 2024-03-22 08:12:14 -07:00
jhendersonHDF
c4cc33abe1
Fix issue with Subfiling VFD and multiple opens of same file (#4194)
* Fix issue with Subfiling VFD and multiple opens of same file

* Update H5_subfile_fid_to_context to return error value instead of ID

* Add helper routine to initialize open file mapping
2024-03-21 17:39:13 -07:00
bmribler
20c570b091
Fix H5Pset_efile_prefix documentation error (#4206)
Fixes GH issue #1759
2024-03-21 09:10:55 -07:00
Dana Robinson
15608c00b5
Call memset before stat calls (#4202)
The buffers passed to stat-like calls are only partially filled in by
the call, leaving ununitialized memory areas when the stat buffers are
created on the stack.

This change memsets the buffers to 0 before the stat calls, quieting
the -fsanitze=memory complaints.
2024-03-21 05:31:30 -07:00
Allen Byrne
85af302798
A path component may include a dot with other characters (#4192) 2024-03-20 16:44:05 -05:00
Glenn Song
a286066123
Handle certain empty subfiling environment variables (#4038) 2024-03-20 10:52:27 -07:00
Dana Robinson
8e78cfebf8
Add semicolons to the end of HSYS_GOTO_ERROR (#4193)
Looks like we forgot these when we did the other macros.
2024-03-20 09:31:11 -07:00
Dana Robinson
56c527d752
Fixes several MinGW + Autotools issues (#4190)
* Fixes detection of various Windows libraries, etc.
* Corrects alarm(2) configure checks
* Uses Win32 threads by default w/ Pthreads override, if desired
* Set _WIN32_WINNT correctly for MinGW
* Fix setenv(3) wrapper for MinGW, which does not have getenv_s()

MinGW Autotools support is still not Amazing, but this at least
allows the library and tools build and is better about thread-safety
2024-03-20 08:40:09 -07:00
H. Joe Lee
c02be4df09
Add a missing period at the end of sentence. (#4184) 2024-03-19 16:32:53 -07:00
Allen Byrne
8f3e544193
Filter plugins updates for registration URL (#4180)
* Update filter plugin URL to new location

* Adjust test array size
2024-03-19 15:11:15 -05:00
jhendersonHDF
48d3e48d59
Add const to new _Float16 conversion routine parameters (#4181) 2024-03-19 07:10:57 -07:00
jhendersonHDF
c91b3e6168
Remove some H5T_copy calls that are now unnecessary (#4164)
Removes some datatype copying calls that are now unnecessary after
refactoring the datatype conversion code to use pointers internally
rather than IDs

Rewrites the enum conversion function so that it uses cached copies
of the source and destination datatypes in order to avoid modifying
the datatypes passed in

Adds a 'recursive' field to the datatype conversion context which
allows the conversion functions for members of a container datatype
to skip unnecessary repetitive conversion setup code

Changes internal datatype conversion callback functions so that the
source and destination datatype structure pointers are const

Removes some unused and unnecessary internal IDs registered with
H5I_register
2024-03-18 21:44:31 -07:00
jhendersonHDF
330b80a266
Add support for _Float16 16-bit floating point type (#4065)
Fixed some conversion issues with Clang due to problematic undefined
behavior when casting a negative floating-point value to an integer

Fixed a bug in the library's software integer to floating-point
conversion function where a user's conversion exception function
returning H5T_CONV_UNHANDLED in the case of overflows would result in
incorrect data after conversion

Added configure checks for functions and macros related to _Float16
usage since some compilers expose the datatype but not the functions or
macros

Fixed a dt_arith test failure when H5_WANT_DCONV_EXCEPTION isn't defined

Fixed a few warnings from not explicitly casting some _Float16 variables
upwards
2024-03-18 21:36:46 -07:00
Allen Byrne
4e222bf5bb
Add filter plugin user guide text. Fix registered URL in docs (#4169) 2024-03-18 08:36:55 -07:00
Dana Robinson
344ba97fec
Allow H5Soffset_simple to accept NULL offsets (#4152)
The reference manual states that the offset parameter of H5Soffset_simple()
  can be set to NULL to reset the offset of a simple dataspace to 0. This
  has never been true, and passing NULL was regarded as an error.

  The library will now accept NULL for the offset parameter and will
  correctly set the offset to zero.

  Fixes HDFFV-9299
2024-03-18 06:57:52 -07:00
Dana Robinson
51fab96f4e
Add Doxygen to API calls in H5VLnative.h (#4173) 2024-03-18 06:06:07 -07:00
Dana Robinson
eb0351efff
Address code page issues w/ Windows file paths (#4172)
On Windows, HDF5 attempted to convert file paths passed to open() and
remove() to UTF-16 in order to handle Unicode file paths. This scheme
does not work when the system uses code pages to handle non-ASCII
file names.

As suggested in the forum post below, we now also try to see if we
can open the file with open(), which should handle systems where
non-ASCII code pages are in use.

https://forum.hdfgroup.org/t/open-create-hdf5-files-with-non-utf8-chars-such-as-shift-jis/11785
2024-03-18 06:05:45 -07:00
jhendersonHDF
840476ead8
Fix an issue where the Subfiling VFD's context cache grows too large (#4159) 2024-03-17 18:48:16 -07:00
Dana Robinson
2908dd1d12
Bump the size of the mirror VFD IP field (#4167)
The IP address string isn't big enought to hold an IPv4-mapped IPv6
address.
2024-03-17 11:34:21 -07:00
jhendersonHDF
a56675e12a
Fix some minor warnings (#4165) 2024-03-16 19:43:47 -07:00
Dana Robinson
87970e1d53
Add Doxygen to H5FDmirror.h (#4158) 2024-03-16 11:44:59 -05:00
Dana Robinson
9a90122ef8
Header cleanup in C library (#4154)
* Ensure H5FL header is included everywhere

* Ensure H5SL header is included everywhere

* Ensure H5MM header is included everywhere
2024-03-16 11:42:32 -05:00
jhendersonHDF
1029e34fb9
Suppress H5Dmpio debugging output unless HDF5_DEBUG=d is set (#4155) 2024-03-16 11:42:01 -05:00
Dana Robinson
6d85ea26ab
Remove H5O header and friend status from H5A.c (#4150) 2024-03-15 13:01:22 -07:00
Sergey Kosukhin
6635198d7f
Fix buffer size calculation in the deflate filter (#4147) 2024-03-15 13:01:03 -07:00
Neil Fortner
40e1c6d078
Fix error when overwriting an indirectly nested vlen with a shorter sequence (#4140) 2024-03-15 09:26:56 -07:00
Dana Robinson
92d1463a02
Clean up some hbool_t/TRUE/FALSE stragglers (#4143)
It looks like most of these snuck in via selection I/O work
2024-03-15 08:54:08 -07:00
Dana Robinson
f3900f2f61
Remove useless headers (#4145)
Removes unnecessary headers from C library source files.
2024-03-15 08:49:59 -07:00
Dana Robinson
56f1092ddb
Overhaul CMake LFS support (#4122)
Externally visible:
* The HDF_ENABLE_LARGE_FILE option (advanced) has been removed
* We no longer run a test program to determine if LFS works, which
  will help with cross-compiling
* On Linux we now unilaterally set -D_LARGEFILE_SOURCE and
  -D_FILE_OFFSET_BITS=64, regardless of 32/64 bit system. CMake
  doesn't offer a nice equivalent to AC_SYS_LARGEFILE and since
  those options do nothing on 64-bit systems, this seems safe and
  covers all our bases. We don't set -D_LARGEFILE64_SOURCE since
  we don't use any of the POSIX 64-bit specific API calls like
  ftello64, as noted above.
* We didn't test for LFS support on non-Linux platforms. We've added
  comments for how LFS should probably be supported on AIX and Solaris,
  which seem to be alive, though uncommon. PRs would be appreciated if
  anyone wishes to test this.

Internal:
* Drops off64_t size checks since this is unused (as in Autotools)
* Remove HDF_EXTRA_FLAGS, which is now unused
* Remove hack around deprecated LINUX_LFS

Fixes #2395
2024-03-12 14:36:50 -07:00
Glenn Song
27f73183e2
Initialize selection type in chunk struct (#4087) 2024-03-12 12:01:23 -07:00
jhendersonHDF
4b297e986c
Implement ID creation optimization for container datatype conversions (#4113)
Makes the datatype conversion context object available during both the
initialization and conversion processes for a datatype conversion
function, allowing the compound, variable-length and array datatype
conversion functions to avoid creating IDs for the datatypes when they
aren't necessary

Adds internal H5CX_pushed routine to determine if an API context is
available to retrieve values from

Also adds error checking to several places in H5T.c and H5Tconv.c where
the code had previously assumed object close operations would succeed
2024-03-12 03:42:32 -07:00
Dana Robinson
ac9541100f
Add Doxygen for HDFS VFD (#4106)
* Add Doxygen for HDFS VFD

* Fix Doxygen warning

* Update H5FDhdfs.h
2024-03-10 17:26:14 -07:00
Dana Robinson
9bc6c20166
Remove lint comments (#4107) 2024-03-10 16:17:49 -07:00
Dana Robinson
700d1a24df
Convert H5B__assert to use error checks (#4109)
Switches assert() calls to HGOTO_ERROR in H5B__assert() so it can be
used in production mode. Also renames it to H5B__verify_structure()
to better reflect what it checks.
2024-03-10 16:16:41 -07:00
Dana Robinson
16b62825b3
Clean up a few things in H5T.c (#4105)
* remove (size_t) noise casts
* replace (hid_t)FAIL with H5I_INVALID_HID
2024-03-10 12:42:29 -07:00
Dana Robinson
f0ba8baa0d
Minimize use of abort() (#4110)
The abort() call is used at several places where it probably shouldn't.
2024-03-10 12:42:16 -07:00
jhendersonHDF
ef401a5f5e
Refactor datatype conversion code to use pointers rather than IDs (#4104)
The datatype conversion code previously used IDs for the source and
destination datatypes rather than pointers to the internal structures
for those datatypes. This was mostly due to the need for an ID for these
datatypes that can be passed to an application-registered datatype
conversion function or datatype conversion exception function. However,
using IDs internally caused a lot of unnecessary ID lookups and hurt
performance of datatype conversions in general. This was especially
problematic for compound datatype conversions, where the ID lookups were
occuring on every member of every compound element of a dataset. The
code has now been refactored to use pointers internally and only create
IDs for datatypes when necessary.

Fixed a test issue in dt_arith where a library datatype conversion
function was being cast to an application conversion function. Since the
two have different prototypes, this started failing after the parameters
for a library conversion function changed from hid_t to H5T_t * and an
extra parameter was added. This appears to have worked coincidentally in
the past since the only different between a library conversion function
and application conversion function was an extra DXPL parameter at the
end of an application conversion function

Fixed an issue where memory wasn't being freed in the h5fc_chk_idx test
program. Even though the program exits quickly after allocating the
memory, it still causes failures when testing with -fsanitize=address
2024-03-09 23:47:31 -08:00
Dana Robinson
28aaeb967c
Change how stats are printed in H5Z (#4097)
H5Z used the soon-to-be-removed HDEBUG macro to decide if stats
would be dumped and to what stream. This is now handled by a
DUMP_DEBUG_STATS_g variable and the output is always sent to
stdout.

This is an internal change, not normally visible to users.
2024-03-09 23:10:58 -08:00
Dana Robinson
6cb4b2f6d7
Remove printf debugging from H5Smpio.c (#4098) 2024-03-09 20:30:34 -08:00
Dana Robinson
08cf031588
Remove H5DEBUG() calls from H5Dmpio.c (#4103)
Just use stdout when a stream is needed.
2024-03-09 20:30:17 -08:00
Dana Robinson
fd7cf2a962
Remove a few H5O printf debugging statements (#4096)
These were in H5Oint.c, were protected by H5O_DEBUG, and only dumped
to stdout if the HDF5_DEBUG environment variable were set to do so.
2024-03-09 20:27:59 -08:00