Skip to content

fix(artifacts): preserve Mach-O load-command string identity - #2110

Merged
morluto merged 9 commits into
morluto:mainfrom
1052326311:fix/macho-load-name-identity
Oct 13, 2026
Merged

morluto merged 9 commits into
morluto:mainfrom
1052326311:fix/macho-load-name-identity

Conversation

@1052326311

@1052326311 1052326311 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Preserve a leading U+FEFF when decoding NUL-terminated Mach-O load-command strings. It is part of the source name/path identity, not a text-file byte-order marker. Stripping it can change an install name and cause an unrelated dylib to appear to resolve.

Original Mach-O change author: @1052326311.

Scope

This PR changes only Mach-O string decoding and its parser/CLI regressions. It sets ignoreBOM: true on the existing fatal UTF-8 decoder; load-command bounds, NUL termination, and invalid UTF-8 rejection remain intact. The focused parser regression covers LC_ID_DYLIB, LC_LOAD_DYLIB, LC_RPATH, and LC_DYLD_ENVIRONMENT. The CLI regression checks ordinary and U+FEFF-prefixed names and confirms that the prefixed identity does not resolve as the ordinary library.

The historical calls-only reconstruction policy change raised in review is not part of this PR's current diff. It is already on the current base in commit 688defca0 fix(comparison): recheck historical calls-only changes (#2223), authored by Lucien (164857476+dakjdakd@users.noreply.github.com).

Validation

Maintenance review inspected the exact diff against current base, ran pinned Oxfmt 0.72.0 on the merge-conflict file, and ran git diff --check. Tests and builds were not run in this maintenance pass. The captured earlier CI run was for the pre-merge head and reported a formatting issue in scripts/lib/clean-linux-hopper-runtime.mjs plus reconstruction comparison failures; the format issue was corrected during the current-base merge, and the comparison behavior is now on the base. Current-head CI is queued/in progress.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T18:39:31.617236Z 7dd981f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge.

Summary

Preserves leading U+FEFF in Mach-O load-command strings with ignoreBOM: true.

  • Mach-O load-command strings keep a leading U+FEFF.

Reviews (7) · Last reviewed commit: "Merge branch 'main' into fix/macho-load-..." · Reviewed by Greptile

morluto and others added 2 commits October 13, 2026 20:13
Node timers can fire while performance.now() is still a fraction of a
millisecond short of the monotonic deadline. ProviderStartupDeadline then
reported interruption "timeout" and an aborted signal while remainingMs()
returned ceil(0.x) = 1, so polling loops guarded by remainingMs() > 0
(Hopper and Ghidra startup) could run past an elapsed deadline, and the
real-timer test "aborts a bounded wait when its real monotonic deadline
expires" failed intermittently in CI (expected 1 to be 0).

Once the deadline's own timer has classified a timeout, report zero
remaining time. A deterministic regression test fires the timer with the
monotonic clock 0.4 ms short of the deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit dfdaa0c)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c3c2f4e1f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/process/ProviderDeadline.ts Resolved
@morluto morluto added bug Something isn't working area: evidence Evidence, artifacts, and reconstruction area: runtime Process capture and runtime observation P2: medium Medium priority issue labels Oct 13, 2026
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open.

review thread

The branch carried an older deadline guard and regression alongside its Mach-O contribution. Captured main now owns a separately scoped monotonic deadline correction: early callbacks rearm the remaining budget and waits retain the absolute deadline. The merge removes the superseded guard/test from this branch's final change; ProviderDeadline.ts and ProviderDeadline.test.ts are identical to captured main. Contributor history is preserved, including the explicitly named process commit, while the final PR delta contains the artifact changes without an independent provider-deadline behavior change.

Published at c94818bdf9867619b2b749434d0e13750c870df0. Validation was producer/consumer source inspection, targeted formatting with two threads and Git diff review only. Tests, compilation, builds, lint, typechecking, provider execution and CI reruns were skipped at the user's explicit request. Regression sources have not been executed and no real-provider proof or performance measurement is claimed. No directly related source cleanup remains from this finding.

morluto and others added 3 commits October 14, 2026 01:00
* fix(comparison): preserve incomplete function call evidence

Keep missing, unknown, partial and unresolved call relationships unknown in function comparisons and reconstruction claims. Aggregate IDA caller and callee coverage without overwriting uncertainty.

Validate with 144 focused tests, typecheck/lint, docs checks and test discovery. Real providers were not verified; the full headless IDA session suite requires unavailable Windows native controls.

* fix(comparison): recheck historical calls-only changes

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2af17a3b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@morluto
morluto merged commit 7072f87 into morluto:main Oct 13, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction area: runtime Process capture and runtime observation bug Something isn't working P2: medium Medium priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants