Skip to content

fix(native): preserve unknown ELF export coverage without a dynsym section - #6827

Merged
gensokyo-dev merged 2 commits into
morluto:mainfrom
leeguooooo:fix/6792-elf-export-coverage
Oct 23, 2026
Merged

gensokyo-dev merged 2 commits into
morluto:mainfrom
leeguooooo:fix/6792-elf-export-coverage

Conversation

@leeguooooo

@leeguooooo leeguooooo commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #6792.

ELF images with PT_DYNAMIC but no SHT_DYNSYM section incorrectly reported a complete, empty export inventory. The shared ELF directory reader now owns the dynamic-segment observation; CLI/MCP report unsupported with a reason. Existing symbol-table results remain intact. Read-only format correction; no new execution authority or public schema.

Validation on the current main integration:

  • npm run check, test discovery, and 166 selected Linux tests pass, including actual CLI/stdio MCP cases and PE/IL2CPP/GPU/Rust reader consumers. Original author validation: 113 tests on macOS, including regressions that failed before the fix; test discovery passed.
  • Real Debian libc (1,926,232 bytes) and libLLVM 14 (109,967,296 bytes), with only section-header-count/name-index bytes changed, reproduce the old false absence in both public adapters. The reviewed implementation returns unsupported in both adapters. Independent Python maps unchanged PT_DYNAMIC declarations and selected symbol bytes; original readelf agrees. The reduced files are not loaded or executed; readelf -D itself cannot enumerate these reduced layouts, and that failed oracle attempt is retained.
  • Unmodified libc still returns all 3,025 exports, byte-identical complete Evidence and the same Evidence ID as the baseline. Resource-guarded public probes completed without stops or payload leftovers. No speed, memory or model-token improvement is claimed for this coverage fix.

Codex review completed with no findings. CI failed: all 61 observed failures (including 47 omitted from the aggregate report by canceled shards) reproduce with identical complete failure diagnostics on the exact CI base and merge trees. Baseline-only bypass is explicitly authorized for this maintenance session; canceled/skipped coverage remains unverified. See the final CI attribution comment. The original author's readiness declaration below is preserved.

Author readiness

Human owner: @leeguooooo

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@gensokyo-dev
gensokyo-dev marked this pull request as ready for review October 23, 2026 18:57
@gensokyo-dev

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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-23T19:02:48.971066Z 8dfa6a6 Manual request
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issue was found in the changed code.

Summary

The shared ELF reader now records whether the file declares PT_DYNAMIC. When that segment exists without SHT_DYNSYM, export inspection returns unsupported instead of claiming a complete, empty result.

  • ELF export checks mark unlisted dynamic symbols as unsupported.

Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 8dfa6a6f88

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev

Copy link
Copy Markdown
Collaborator

Latest head 8dfa6a6f880837baac8d61cac5f19e08c718d83d: Codex review completed with no findings. The Linux validation now includes 166 selected tests (47 exports/PE/IL2CPP/public-adapter cases plus 119 GPU/Rust consumer cases), npm run check, and discovery of all 2,177 test files exactly once. All 220 actual SDK tool advertisements are byte-identical to the unchanged-main control.

The Source tests job in CI 40007458412 reports 11 failures: five Map-operation cases, one shared callable-alias case, four Frida cleanup cases, and one bundle-resource schema case. I reproduced those exact 11 cases against CI base 34563fcc9bd92af30668820dcac5635e27181094 and the exact CI merge tree 2ecbbb993dc673cc18df583fb47fd09e0d9a4206. Each control has 11 failures, 0 passes, 155 unselected cases; the complete failure case set and failure messages match after replacing the worktree path. These source failures are baseline failures, not introduced by this export-coverage change. No passing full-suite claim is made.

The eight built test shards remain active. Their results and any partial reports/canceled logs will be audited before merge; this source attribution does not establish that every remaining CI failure is unrelated.

@gensokyo-dev

Copy link
Copy Markdown
Collaborator

Final audit of CI 40007458412 on exact head 8dfa6a6f880837baac8d61cac5f19e08c718d83d:

  • CI's merged report contains 14 failed assertions. Auditing all seven canceled shard logs found another 47 already-failed assertions that were absent from that report: 61 observed failures total (11 source + 50 built).
  • Executed the exact observed cases on CI base 34563fcc9bd92af30668820dcac5635e27181094 and exact CI merge 2ecbbb993dc673cc18df583fb47fd09e0d9a4206, using the same pinned toolchain, lockfile, single worker, serial files and resource guard. Source cohorts each: 11 failures, 0 passes, 155 unselected. Built cohorts each: 50 failures, 0 passes, 347 unselected. Every case and complete failure message matches after replacing only the checkout path; per-file counts and case titles match the CI/canceled logs. No source fix is needed in this PR for those baseline failures.
  • The PR-specific and shared-consumer validation remains 166 passing selected tests, npm run check, test discovery, and real libc/libLLVM CLI/stdio observations. The complete 220-tool SDK directory and unmodified libc's complete Evidence are byte-identical to the unchanged control. Codex review completed at this head with no findings.
  • CI is still failed, and canceled/skipped lanes remain unverified. This is not a full-suite or real Windows/macOS provider qualification. Per the maintainer's explicit authorization in this maintenance session, baseline-only failures may be bypassed after attribution; merging this exact head under that authorization.

@gensokyo-dev
gensokyo-dev merged commit 9fd78a7 into morluto:main Oct 23, 2026
34 of 46 checks passed
@gensokyo-dev

gensokyo-dev commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Post-merge verification passed on actual main 9fd78a74f84a8e924bd58e7deaf5934bfb24f53c: rebuilt the production runtime, then repeated real public CLI/stdio MCP probes on unmodified libc plus section-table-reduced libc/libLLVM. All six observations agree, reduced copies remain unsupported, and unmodified libc keeps the identical complete report and Evidence ID. Post-merge catalog changes from intervening main commits are recorded separately; the earlier byte-identical catalog result applies to tested PR head 8dfa6a6 and its validated unchanged-main control, not the newer merged main. No target library was loaded/executed; no resource guard stops or payload leftovers in the public probe. #6792 is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] ELF export inventory reports complete absence when only dynamic-segment symbols remain

2 participants