fix: preserve the explicitly selected main module - #297
Merged
Merged
Conversation
swananan
marked this pull request as ready for review
September 6, 2026 04:59
swananan
force-pushed
the
fix/explicit-main-module
branch
from
September 6, 2026 06:11
cd9803a to
6e2a165
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The analyzer inferred its main module from filenames, so an executable named
worker.softwareor 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:cargo test --locked --workspace --exclude ghostscope-e2e-tests --all-features: 952 unit, integration, and documentation tests passed.host -> docker-privatee2e: 342 passed, including 49 Rust globals tests.