From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:HDF5" |
|---|
| claim | "Superblock versions 0 and 1 (offsets from the signature): signature(8), version(1), free-space version(1, must be 0), root group version(1, must be 0), reserved(1), shared header version(1, must be 0), size of offsets(1), size of lengths(1), reserved(1), group leaf node K(u16, nonzero), group internal node K(u16, nonzero), file consistency flags(u32, at most 255 and only bits 0x01 write access, 0x02 file OK, 0x04 SWMR write); version 1 adds indexed-storage internal node K(u16) and 2 reserved bytes; then base address, a second address (read as the superblock extension address, but must be undefined for version <2), end-of-file address, driver information block address (each size-of-offsets bytes) and the root group symbol table entry. Sizes of offsets and lengths must each be 2, 4, 8, 16 or 32." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:HDF5" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "H5F_super_t v0/v1 on disk" |
|---|
| size_min | 60 |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 8 |
|---|
| type | "uint8_t[8]" |
|---|
| name | "signature" |
|---|
|
| offset | "0x8" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "superblock_version" |
|---|
| notes | "0 or 1" |
|---|
|
| offset | "0x9" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "freespace_version" |
|---|
| notes | "must be 0" |
|---|
|
| offset | "0xA" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "root_group_version" |
|---|
| notes | "must be 0" |
|---|
|
| offset | "0xB" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "reserved" |
|---|
|
| offset | "0xC" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "shared_header_version" |
|---|
| notes | "must be 0" |
|---|
|
| offset | "0xD" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "sizeof_addr" |
|---|
|
| offset | "0xE" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "sizeof_size" |
|---|
|
| offset | "0xF" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "reserved" |
|---|
|
| offset | "0x10" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "group_leaf_k" |
|---|
|
| offset | "0x12" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "group_internal_k" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "consistency_flags" |
|---|
|
| offset | "0x18" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "indexed_storage_internal_k" |
|---|
| condition | "version 1 only" |
|---|
| notes | "followed by 2 reserved bytes; v0 assumes 32" |
|---|
|
|
|---|
| notes | "Fields after the fixed part, starting at 0x18 (v0) or 0x1C (v1): base_address, extension address, end_of_file_address, driver_info_address (each sizeof_addr bytes), then the root group symbol table entry (sizeof_size + sizeof_addr + 4 + 4 + 16 bytes). Total size: 60 (v0) / 64 (v1) with 2-byte offsets and lengths, 96 (v0) / 100 (v1) with 8-byte ones." |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Read H5F__superblock_prefix_decode and the version <2 branch of H5F__cache_superblock_deserialize; sizes from H5Fpkg.h lines 90-127 (H5F_SUPERBLOCK_VARLEN_SIZE_V0/V1) and flag bits at H5Fpkg.h lines 49-53." |
|---|
| repo | "https://github.com/HDFGroup/hdf5" |
|---|
| commit | "ab5df5526c96a03bf1d89cea59603b77a239eac0" |
|---|
| path | "src/H5Fsuper_cache.c" |
|---|
| lines | "150-206, 427-566" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Superblock versions 0 and 1" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T04:53:05.892Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:49:13.778Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read H5Fsuper_cache.c (lines 177-200, 484-526: sizeof_addr/size must be 2/4/8/16/32, snode K nonzero, status_flags > 255 rejected, v1 reads chunk btree K) and H5Fpkg.h H5F_SUPERBLOCK_VARLEN_SIZE_V0/V1: 9 + 15 common + (v1: 4) + 4 addresses + root entry = 60 (v0) / 64 (v1) with 2-byte sizes. Offsets and minimum sizes match." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T08:37:32.354Z" |
|---|
| summary | "size_min 56 was wrong. H5Fpkg.h H5F_SUPERBLOCK_VARLEN_SIZE_V0/V1 plus H5G_SIZEOF_ENTRY give, with the smallest allowed sizes of offsets and lengths (2 and 2): 9 prefix + 15 common + 8 + 28 entry =…" |
|---|
| changed | |
|---|
|
|
|---|