Repository navigation
fix(native): project Mach-O evidence into container file offsets - #812
Closed
rudycelekli wants to merge 1 commit into
Closed
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
Signed-off-by: Rudy Celekli <[email protected]>
Owner
|
Superseded by #815, which integrated this change and has now merged (3af3811). Thanks @rudycelekli for the fix and the thorough verification — much appreciated! |
2 tasks done
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.
Summary
Project Mach-O segment evidence ranges into the containing file, rather than reporting slice-relative offsets as whole-file locations.
Problem and expected behavior
A normal
clang/lipouniversal executable has an arm64 slice at byte16384. PublicNativeMacOSProvider.inspect_machocurrently points its__TEXTevidence at byte0 (the FAT header), although the tool-reported segment belongs to that selected slice. The x86_64 selection has the same problem. Evidence locations should identify the actual container bytes. This is an ordinary reproduced bug fix, not a large contract change requiring an issue.Change and scope
Use the selected architecture offset from the existing
lipoobservation when projecting segment evidence. Preserve zero-offset thin binaries. When a FAT slice offset is unavailable, omit the affected segment locations and retain an explicit limitation instead of guessing byte0. Raw segment, section, and entry-point offsets stay slice-relative; document that distinction.Contract and boundary impact
docs/product-catalog.json), package, or installation impact: none.Evidence and regression coverage
Tests added or updated: five thin/FAT/unknown-offset controls in the existing selected-architecture suite; four new failures on the base source.
Base reproduction or other evidence: actual existing Clang/lipo binaries, public target resolution and native provider; both thin controls pass before, both selected universal architectures fail before and pass after.
User-visible CLI/MCP output: for the observed arm64 universal fixture,
__TEXTevidence begins at16384 instead of0. Rawsegments.items[].file_offsetremains0.Remaining proof gaps: missing FAT offsets are fixture boundary controls, not claimed native lipo failures. Native producer coverage is macOS only; no Hopper/Ghidra, other OS, or full-provider-matrix claim.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
npm run check:5tasks passed,129 existing warnings and zero errors.npm run check:fast:2tasks passed.npm run docs:checkandnpm run build:passed.Compatibility, safety, and release
Review checklist
type(scope): outcome.AI-assisted implementation and verification; I reviewed the patch and ran the reported checks.