format: checked chunk addresses on the parallel read path

Three `chunk_info.address as usize` casts behind the `parallel` feature
survived the conversion, because check-32bit-casts.sh linted only default
features plus plugin-filters. On a 32-bit target with rayon a chunk address
past 4 GiB still wrapped onto another part of the file. They go through
addr::to_usize now, and the lane index (h % n, always < n) through
saturating_usize.

The script now lints no default features, default features, and every
optional feature but szip (wasm32; the set with zstd, which does not build
for wasm32, on the host, where the lint reports the same casts). With the
old parallel_read.rs/lane_partition.rs it fails listing the four casts; the
old script passed them. CHANGELOG and the design note give the exact count
(119) and what is not covered.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
osobh
2026-09-26 14:08:57 -05:00
co-authored by Claude Opus 5.5
parent 92c8285549
commit b6cbd2319f
5 changed files with 68 additions and 25 deletions
+5 -4
View File
@@ -383,10 +383,11 @@ fast path within benchmark noise.
attribute names through the name indexes (`group_v2::resolve_child`,
`attribute::find_attribute_in_file`; creation-order lookups by name do
not exist in the API, so the creation-order index is still only listed),
`addr::to_usize`/`saturating_usize` for all 115 `u64 as usize` casts in
`clawhdf5-format` (the 133 above counted any `*addr*/*offset* as usize`,
mostly widening `u8`/`u32` casts; `scripts/check-32bit-casts.sh` lints
wasm32 for the truncating ones), and `Group::entries`/`File::group_at`.
`addr::to_usize`/`saturating_usize` for all 119 truncating `u64 as usize`
casts clippy finds in `clawhdf5-format` under any CI-built feature set but
`szip` (the 133 above counted any `*addr*/*offset* as usize`, mostly
widening `u8`/`u32` casts; `scripts/check-32bit-casts.sh` lints those
feature sets for new ones), and `Group::entries`/`File::group_at`.
The facade, io and ann casts are not converted.
**M1 — metadata over the trait, in-memory impl identical to today (2–3 weeks).**