Repository navigation
MachO: allow DynamicLinks() on objects with no LC_LOAD_DYLIB commands - #69
Merged
Merged
Conversation
`MachODynamicLinks(::MachOLoadCmds)` passed `findall()`'s result straight to
the inner constructor, which requires a `Vector{MachOLoadCmdRef{H,
MachOLoadDylibCmd{H}}}`. When a file has no dylib load commands (object files,
dSYM DWARF companions), `findall()` returns an untyped empty vector, and the
call throws a `MethodError`. Convert the result to the concrete element type.
Adds a Mach-O object fixture (with its build script) and tests for it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnarizMR2SWPhSLsrSZ2WM
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #69 +/- ##
=======================================
Coverage 73.47% 73.47%
=======================================
Files 48 48
Lines 1587 1587
=======================================
Hits 1166 1166
Misses 421 421 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 16, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MachODynamicLinks(::MachOLoadCmds)passedfindall()'s result straight to the inner constructor, which requires aVector{MachOLoadCmdRef{H,MachOLoadDylibCmd{H}}}. When a Mach-O file has noLC_LOAD_DYLIBcommands (object files, dSYM DWARF companions),findall()returns an untyped empty vector, andDynamicLinks(oh)throws aMethodError. This PR converts the result to the concrete element type.It also adds a Mach-O object fixture,
test/macobj/foo.o, built with clang bytest/macobj/build.sh, plus tests for it. Without the fix, the new test fails with theMethodError. The full suite passes locally on Julia 1.12.7 and 1.6.7.🤖 Generated with Claude Code
https://claude.ai/code/session_01Jnarj2GtE4M4S1QpHNC3Ei