Repository navigation
fix(apple): derive dyld environment findings from each traced slice - #2733
Merged
Merged
Conversation
deriveFindings looked up each traced root's slice again by architecture name. A universal executable with arm64e and arm64e.x1 slices reports both as "arm64e", so both roots resolved to the first slice: a later slice's LC_DYLD_ENVIRONMENT produced no finding, or the first slice's command was reported twice. The per-slice dyld_environment arrays were already correct. traceDylibLoading already has the exact slice when it records a root, so pass it to deriveFindings instead of re-deriving it from the name. The public roots and findings shapes are unchanged. Fixes #2661 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
3 tasks done
2 tasks
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.
Fixes #2661.
Problem
deriveFindings(src/domain/apple/dylibResolutionFindings.ts) buildsdyld-environment-presentfindings by looking up each traced root's slice again by architecture name:A universal executable with
arm64eandarm64e.x1slices reports both asarm64e, so both roots resolved to the first slice:LC_DYLD_ENVIRONMENT, there is no finding at all.The per-slice
images[].slices[].dyld_environmentarrays were already correct, so only the derived findings were wrong.Fix
traceDylibLoadingalready has the exact slice when it records each root. It now passes{ image, slice }pairs toderiveFindingsinstead of having the findings code re-derive the slice from its name. The unusedimageslookup parameter is removed.The public
roots({ image, architecture }) andfindingsshapes are unchanged, so no schema or catalog change is needed.Validation
dylibResolutionCli.test.ts > reports each same-named slice's own embedded dyld environment. It runsrea trace-dylib-resolutionon a FAT executable witharm64eandarm64e.x1slices, in two cases: a setting on the second slice only, and distinct settings on both slices. It asserts onedyld-environment-presentfinding per slice carrying that slice's own setting. It fails on main and passes here.npm run check:fastandformat:checkpass.🤖 Generated with Claude Code