Skip to content

Fix eltype for FatMachOHandle - #59

Merged
topolarity merged 3 commits into
JuliaIO:masterfrom
topolarity:ct/fix-fat-macho-eltype
Oct 10, 2026
Merged

topolarity merged 3 commits into
JuliaIO:masterfrom
topolarity:ct/fix-fat-macho-eltype

Conversation

@topolarity

Copy link
Copy Markdown
Collaborator

@codecov

codecov Bot commented Apr 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.93%. Comparing base (815c42e) to head (40443fe).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
- Coverage   69.94%   69.93%   -0.01%     
==========================================
  Files          46       46              
  Lines        1364     1367       +3     
==========================================
+ Hits          954      956       +2     
- Misses        410      411       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

topolarity and others added 2 commits October 9, 2026 09:46
Fat files with `FAT_MAGIC_64` could not be read at all:

 - `macho_endianness()` did not know `FAT_MAGIC_64` / `FAT_CIGAM_64`,
   so `readmeta()` threw a `MagicMismatch` for them.
 - `MachOFatArch64` declared `cputype` and `cpusubtype` as `UInt64`,
   but in `fat_arch_64` they are 32-bit, as in `fat_arch`.  This
   shifted every following field, so slice offsets were wrong.

Add a `libfoo_fat64.dylib` test fixture, made from the slices of
`libfoo_fat.dylib` with `llvm-lipo -create -fat64` (LLVM 18).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`position()` of an `IOBuffer` is an `Int`, which on 32-bit platforms
does not match the `Int64` start of a `FatMachOHandle`.  Convert it,
as the other handle types already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@topolarity
topolarity force-pushed the ct/fix-fat-macho-eltype branch from 03fbe67 to 40443fe Compare October 9, 2026 13:47
@topolarity

Copy link
Copy Markdown
Collaborator Author

Merging this as a straightforward bug fix.

@topolarity
topolarity merged commit 0a70fc1 into JuliaIO:master Oct 10, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when checking the SONAME of some libraries on macOS

1 participant