- 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