Skip to content

Commit

Permalink
Remove an error check regarding large cache objects (HDFGroup#4254)
Browse files Browse the repository at this point in the history
* Remove an error check regarding large cache objects

In PR#4231 an assert() call was converted to a normal HDF5 error
check. It turns out that the original assert() was added by a
developer as a way of being alerted that large cache objects
existed instead of as a guard against incorrect behavior, making
it unnecessary in either debug or release builds.

The error check has been removed.

* Update RELEASE.txt
  • Loading branch information
derobins authored and lrknox committed Mar 29, 2024
1 parent 855f475 commit 945e731
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
16 changes: 8 additions & 8 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -461,17 +461,17 @@ Bug Fixes since HDF5-1.14.3 release

Library
-------
- Fixed a cache assert with too-large metadata objects
- Fixed a cache assert with very large metadata objects

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.
If the library tries to load a metadata object that is above a
certain size, this would trip an assert in debug builds. This could
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.
There is no need for this assert. The library's metadata cache
can handle large objects. The assert has been removed.

Partially addresses GitHub #3762
Fixes GitHub #3762

- Fixed an issue with the Subfiling VFD and multiple opens of a
file
Expand Down
8 changes: 0 additions & 8 deletions src/H5Centry.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,14 +1288,6 @@ H5C__load_entry(H5F_t *f,

H5C__RESET_CACHE_ENTRY_STATS(entry);

/* This is a temporary fix for a problem identified in GitHub #3762, where
* it looks like a local heap entry can grow to a size that is larger
* than the metadata cache will allow. This doesn't fix the underlying
* problem, but it at least prevents the library from crashing.
*/
if (entry->size >= H5C_MAX_ENTRY_SIZE)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "cache entry size is too large");

ret_value = thing;

done:
Expand Down

0 comments on commit 945e731

Please sign in to comment.