From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:HDF5" |
|---|
| claim | "Superblock versions 2 and 3 (same layout) are: signature(8), version(1), size of offsets(1), size of lengths(1), file consistency flags(1 byte; bits 0x01 write access, 0x02 file OK, 0x04 SWMR write), base address, superblock extension address, end-of-file address, root group object header address (each size-of-offsets bytes, root address nonzero) and a 4-byte checksum computed over everything before it (H5_checksum_metadata). A driver info block does not exist in these versions. Version 3 is what SWMR needs; the library refuses SWMR-write on a file with superblock version below 3, and 3 is the highest version it accepts." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:HDF5" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "H5F_super_t v2/v3 on disk" |
|---|
| size_min | 24 |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 8 |
|---|
| type | "uint8_t[8]" |
|---|
| name | "signature" |
|---|
|
| offset | "0x8" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "superblock_version" |
|---|
| notes | "2 or 3" |
|---|
|
| offset | "0x9" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "sizeof_addr" |
|---|
|
| offset | "0xA" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "sizeof_size" |
|---|
|
| offset | "0xB" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "consistency_flags" |
|---|
|
|
|---|
| notes | "From 0xC: base_address, extension_address, end_of_file_address, root_group_object_header_address (each sizeof_addr bytes), then uint32 checksum; total size 12 + 4*sizeof_addr + 4 (48 with 8-byte offsets). The checksum algorithm itself (H5_checksum_metadata) was not read." |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Read the version >=2 branch of H5F__cache_superblock_deserialize; sizes from H5Fpkg.h lines 116-127 (H5F_SUPERBLOCK_VARLEN_SIZE_V2); SWMR check in H5Fsuper.c lines 447-453 (the H5F_ACC_SWMR_WRITE branch); version names in H5Fprivate.h lines 299-307 (version 3: file locking and consistency flags)." |
|---|
| repo | "https://github.com/HDFGroup/hdf5" |
|---|
| commit | "ab5df5526c96a03bf1d89cea59603b77a239eac0" |
|---|
| path | "src/H5Fsuper_cache.c" |
|---|
| lines | "576-660" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Superblock versions 2 and 3" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T04:53:05.956Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:38:05.715Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read the version >= 2 branch of H5F__cache_superblock_deserialize (H5Fsuper_cache.c, lines 582-650) and H5F_SUPERBLOCK_VARLEN_SIZE_V2 in H5Fpkg.h: sizeof_addr, sizeof_size, one status flag byte, four addresses (base, extension, EOF, root; root must be nonzero), 4-byte checksum, driver address forced undefined; minimum 12 + 4*2 + 4 = 24." |
|---|
|
|
|---|