- Verified that the listed functions do not include null terminator in the returned length
- Improved some of the tests
- Corrected documentation
Fixes GH-4704
* Casted a positive int to size_t
This PR is part of the incremental switching H5I_object() and H5I_object_verify()
to their VOL counterpart, H5VL_object() and H5VL_vol_object_verify(), a newly addedinternal function.
Fixes GH-4730 partially.
* Fix incorrect VOL vs. non-VOL calls
H5Lget_info2() called H5I_object() instead of H5VL_vol_object() crashed
user application.
This is a wide-spread issue (GH-4730) but this PR only addresses GH-4705.
* Remove an incorrect change
Added functionality tests for the following APIs:
H5Rget_file_name
H5Rget_obj_name
H5Rget_attr_name
Also removed "+1" when returning a name length in H5R__get_attr_name().
The exter "+1" gave an incorrect value for the length of the referenced
object's attribute name.
Fixed GH-4447
* Fix Fortran test
The C API H5Rget_attr_name incorrectly added 1 to the length of the
referenced object's attribute name, so the Fortran API h5rget_attr_name_f
removed 1 from the returned value to accommodate the incorrectness.
This PR fixes H5Rget_attr_name so this workaround in h5rget_attr_name_f
is no longer needed.
* Add test H5Aget_name against H5Rget_attr_name
Complete overhaul of the concurrency-related aspects of the library (threading, atomics, locking, etc.), adding private routines in the H5TS package to allow internal algorithms to use all of these capabilities.
Adds many new features & components in the H5TS package that are equivalent to common concurrency data structures and capabilities: "regular" and recursive mutices, condition variables, semaphores, thread barriers, 'once' support, thread pools, atomic variables, thread-local keys, and spawning & joining internal threads.
Now supports C11, pthreads, and Windows threading for all H5TS capabilities, except the recursive readers/writers lock, which is not supported on Windows (because Windows threads don't provide a callback on thread-local variable deletion).
The "global" API lock is switched to use a recursive mutex from the H5TS package, instead of its own variant.
API context code (H5CX package) and error stacks (H5E package) now use the common thread-local info, instead of their own variants.
Subfiling code is switched from using Mercury threading features to the new internal H5TS features.
Removes the mercury threading code.
Adds a configure option (--enable-threads / HDF5_ENABLE_THREADS), enabled by default, to control whether threading is enabled within the library.
* Replace incorrect use of an internal function
In some API functions, the internal function H5I_object() was used instead
of H5I_object_verify(), which verifies the type of an ID argument. So
when an inappropriate ID was passed in to the affected API, it was accepted.
This behavior can cause issues at a later time, including a segfault, as
reported in issue #GH-4656.
The fix was applied to the following functions:
H5Fget_intent()
H5Fget_fileno()
H5Fget_freespace()
H5Fget_create_plist()
H5Fget_access_plist()
H5Fget_vfd_handle()
H5Dvlen_get_buf_size()
H5Fget_mdc_config()
H5Fset_mdc_config()
H5Freset_mdc_hit_rate_stats()
Fixes GH-4662
* Add show option
* remove non-static libs and correct names of static libs
* Fixup the pkg-config libs and comp builds
* Fix commands and add fortran pkg-config test scripts
* Add help usage option
An internal capability that's similar to the H5E_BEGIN_TRY / H5E_END_TRY
macros in H5Epublic.h, but more efficient since we can avoid pushing errors on
the stack entirely (and those macros use public API routines).
This capability (and other techniques) can be used to remove use of
H5E_clear_stack() and H5E_BEGIN_TRY / H5E_END_TRY within library routines.
We want to remove H5E_clear_stack() because it can trigger calls to the H5I
interface from within the H5E code, which creates a great deal of complexity
for threadsafe code. And we want to remove H5E_BEGIN_TRY / H5E_END_TRY's
because they make public API calls from within the library code.
Also some other minor tidying in routines related to removing the use of
H5E_clear_stack() and H5E_BEGIN_TRY / H5E_END_TRY from H5Fint.c
* off_t --> HDoff_t in test
* off_t --> HDoff_t in h5ls, h5dump, & h5repack
* Minor off_t tweak to configure.ac
* off_t --> HDoff_t fixes in src
This changes the type of the offset parameter in H5Pget_external()
to HDoff_t to match H5Pset_external(), along with other minor tweaks.
* off_t --> HDoff_t in C++ wrappers
* Fix off_t usage in Java wrapper