[PR #6827] [MERGED] fix(native): preserve unknown ELF export coverage without a dynsym section #7420

Closed
opened 2026-11-01 21:47:45 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6827
Author: @leeguooooo
Created: 10/23/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @gensokyo-dev

Base: main ← Head: fix/6792-elf-export-coverage


📝 Commits (2)

  • 29328e7 fix(native): 保留 ELF 动态导出无法枚举时的覆盖状态
  • 8dfa6a6 Merge remote-tracking branch 'origin/main' into review/6827-export-coverage-20261023

📊 Changes

4 files changed (+117 additions, -10 deletions)

View changed files

📝 src/native/exports/NativeExportParser.ts (+8 -3)
📝 src/native/metadata/NativeSectionDirectory.ts (+17 -4)
➕ tests/acceptance/applications/nativeExportsDynamicSegment.test.ts (+69 -0)
📝 tests/fixtures/binaryDiagnostics/nativeExports.ts (+23 -3)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/6827 **Author:** [@leeguooooo](https://github.com/leeguooooo) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `fix/6792-elf-export-coverage` --- ### 📝 Commits (2) - [`29328e7`](https://github.com/morluto/rea/commit/29328e7ac13e50af7179c65c94bc7a9c24ea0776) fix(native): 保留 ELF 动态导出无法枚举时的覆盖状态 - [`8dfa6a6`](https://github.com/morluto/rea/commit/8dfa6a6f880837baac8d61cac5f19e08c718d83d) Merge remote-tracking branch 'origin/main' into review/6827-export-coverage-20261023 ### 📊 Changes **4 files changed** (+117 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/native/exports/NativeExportParser.ts` (+8 -3) 📝 `src/native/metadata/NativeSectionDirectory.ts` (+17 -4) ➕ `tests/acceptance/applications/nativeExportsDynamicSegment.test.ts` (+69 -0) 📝 `tests/fixtures/binaryDiagnostics/nativeExports.ts` (+23 -3) </details> ### 📄 Description 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 - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:47:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#7420
No description provided.