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

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

* fix(process): report no remaining time after a provider deadline fires

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 dfdaa0ca74cc84a45dcb186422a0f51aa61bc427)

* fix(ci): isolate Linux Hopper process fixture inventory

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

* 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>

* style: format identity comparison and IDA runner

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Lucien <164857476+dakjdakd@users.noreply.github.com>
This commit is contained in:
xin zhuang
2026-10-14 06:38:32 +08:00
committed by GitHub
co-authored by morluto Kaoru0822 Claude Opus 5.5 Lucien
parent 1ebbc3b371
commit 7072f87baf
3 changed files with 74 additions and 1 deletions
@@ -229,6 +229,27 @@ it("selects matching arm64e subtype slices when tracing a mixed FAT image", asyn
});
describe("Mach-O load command reader: decodes thin-image load commands", () => {
it("preserves leading U+FEFF in load-command strings", async () => {
const image = machoImage({
commands: [
dylibCommand(LC.ID_DYLIB, "\uFEFF@rpath/libself.dylib"),
dylibCommand(LC.LOAD_DYLIB, "\uFEFF@rpath/libother.dylib"),
rpathCommand("\uFEFF@loader_path/Frameworks"),
dyldEnvironmentCommand("\uFEFFDYLD_LIBRARY_PATH=/example"),
],
});
expect(await read(image)).toMatchObject({
status: "parsed",
slices: [
{
install_name: "\uFEFF@rpath/libself.dylib",
dependencies: [{ install_name: "\uFEFF@rpath/libother.dylib" }],
rpaths: ["\uFEFF@loader_path/Frameworks"],
dyld_environment: ["\uFEFFDYLD_LIBRARY_PATH=/example"],
},
],
});
});
it("decodes dylib loading commands of a thin image", async () => {
const image = machoImage({
fileType: FILE_TYPE.dylib,
@@ -456,7 +456,8 @@ const commandString = (
`load command ${index} has an unterminated string`,
);
try {
return new TextDecoder("utf-8", { fatal: true }).decode(
// lc_str contains name/path data, so a leading U+FEFF is part of its identity.
return new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
body.subarray(offset, end),
);
} catch {