Skip to content

fix: preserve the explicitly selected main module - #297

Merged
swananan merged 1 commit into
mainfrom
fix/explicit-main-module
Sep 6, 2026
Merged

swananan merged 1 commit into
mainfrom
fix/explicit-main-module

Conversation

@swananan

@swananan swananan commented Sep 6, 2026

Copy link
Copy Markdown
Owner

The analyzer inferred its main module from filenames, so an executable named worker.software or an explicit shared-library target could lose its default module. PID file information also added the mapping start to non-PIE ELF addresses.

Record the explicit target in target mode and resolve the process executable by file identity in PID mode. Use that identity for default module resolution, module roles, and executable metadata, with runtime addresses rebased by the load bias. Retry an unresolved PID identity after successful module refresh, including refreshes with no newly loaded modules, while preserving an already selected target.

Three compiled-ELF integration tests cover target names, explicit shared libraries, PID identity, non-PIE addresses, and restoration of an executable path with the same inode both before and after its initial ELF load. The restoration regression fails before the fix and passes after it; the original independent review probe also passes.

Validation on 6e2a165:

  • Formatting and full workspace Clippy passed with warnings denied.
  • cargo test --locked --workspace --exclude ghostscope-e2e-tests --all-features: 952 unit, integration, and documentation tests passed.
  • Full standard e2e: 342 passed, including 49 Rust globals tests.
  • Full host -> docker-private e2e: 342 passed, including 49 Rust globals tests.
  • All 10 GitHub checks passed: CI, DWARF performance regression, three full container topologies, and host-PID smoke.

@swananan
swananan marked this pull request as ready for review September 6, 2026 04:59
Base automatically changed from fix/elf-load-bias to main September 6, 2026 05:20
@swananan
swananan force-pushed the fix/explicit-main-module branch from cd9803a to 6e2a165 Compare September 6, 2026 06:11
@swananan
swananan merged commit ded3617 into main Sep 6, 2026
10 checks passed
@swananan
swananan deleted the fix/explicit-main-module branch September 6, 2026 07:01
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.

1 participant