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:
osobh
2026-09-26 01:22:27 -05:00
co-authored by Claude Opus 5.5
parent 386bd1d41e
commit b8492bd28d
5 changed files with 228 additions and 13 deletions
+2 -2
View File
@@ -137,8 +137,8 @@ fill-value item that did is fixed).
- **Header checks:** on 12 CVE datasets libhdf5 rejects a corrupt header and
we read data anyway. We need stricter header checks. The same gap shows in
`h5rs check`, which validates with the library's parsers: of the 180
files of the CVE corpus, `check --data` passes 33, and h5dump 1.14.6
rejects 26 of those (measured on tank, 2026-09-26, with
files of the CVE corpus, `check --data` passes 28, and h5dump 1.14.6
rejects 21 of those (measured on tank, 2026-09-26, with
`h5rs check --data F` and `h5dump F` per file).
- **Writer:**
- Nested groups beyond one level: path-like names are now refused, not