mirror of
https://github.com/morluto/rea.git
synced 2026-12-02 11:33:10 +00:00
The universal Mach-O reader reported complete coverage whenever lipo and the FAT table agreed, without comparing the slice ranges with the file. Bytes appended after the last slice, or placed before a slice beyond the padding its alignment needs, were never exposed and nothing said so. readMachoImage now reports where the FAT table ends, including Apple's hidden ARM64 row. fatUnaccountedBytes measures the bytes outside the table, every slice and each slice's alignment padding, following lipo's placement of every slice at the first offset its alignment allows. Any such bytes keep coverage unknown with a limitation that counts them and names the first offset. Without a FAT parse only the fixed header is known, which measures leading bytes conservatively. The FAT fixture no longer pads its last slice, matching lipo output; the two tests that needed bytes past the last slice now add them explicitly. Fixes #15534