fix(tools): h5rs check --data follows VL data into the global heap
The README said check skips only "global heap collections other than those a value read touches", but read_dataset returns the raw heap IDs, so no collection was ever read: a file whose global heap collection claims a 4 GiB object passed `check --data` with no problems, while h5dump (and h5rs dump/diff) fail on it. With --data, every variable-length element (strings and sequences, also inside compounds, arrays and nested sequences) of every dataset and attribute is followed into its collection. A collection that does not parse, a missing heap object, or a sequence longer than its heap object is a problem at the collection's address, once per object; the summary counts the collections read. Measured on tank, 2026-09-26: the 418 fully-read conformance ok files still pass (scripts/h5rs-check-ok-files.sh --data, 0 flagged), and `check --data` now flags 152 of the 180 CVE-corpus files (was 147); of the 28 it passes, h5dump 1.14.6 rejects 21 (was 26 of 33). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
+4
-2
@@ -151,8 +151,10 @@
|
||||
printed with its address; exit 1 when there are any. libhdf5's h5check
|
||||
reads only the 1.8 format. On the conformance corpus it passes all 418
|
||||
files that both clawhdf5 and h5py read in full, and `check --data` flags
|
||||
147 of the 180 files of the CVE corpus (tank, 2026-09-26). It inherits
|
||||
the library's tolerance, though: 26 of the 33 it passes are files
|
||||
152 of the 180 files of the CVE corpus (tank, 2026-09-26). `--data` also
|
||||
follows variable-length data into its global heap collections and
|
||||
reports a damaged one at its address. It inherits the library's
|
||||
tolerance, though: 21 of the 28 it passes are files
|
||||
h5dump 1.14.6 rejects (see `docs/known-issues.md`, header checks).
|
||||
- Values over `--max-bytes` (default 1 GiB) are reported instead of read;
|
||||
a panic is caught and reported as an internal error (exit 3).
|
||||
|
||||
Reference in New Issue
Block a user