fix: bind globals before projecting access paths - #298
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
swananan
force-pushed
the
fix/bind-globals-before-projection
branch
from
September 6, 2026 07:46
28e9c89 to
da7727f
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.
Two compilation units can each define a static
cfg. Previously,cfg.othercould select the other unit's object merely because it had the requested field. Bind the declaration before lowering or projecting the access path, and keep an invalid field access as an error.PC-aware global fallback now retains each indexed static's lexical owner and checks it against the active function, lexical blocks, and inline origins before preferring the current compilation unit. An unrelated function's
static state = 999no longer hides the externalstate = 11used by the traced function. Addressless anonymous scopes emitted by Clang remain candidates for ambiguity checking; their compilation unit alone cannot make them win. Existing global discovery and context-free queries still include static locals.Validation:
cargo fmt --all, full workspace Clippy with warnings and undocumented unsafe blocks denied, and 955 non-e2e unit/integration/doc tests passed.8b0914225ff3).da7727f, including standard e2e, all three full container topologies, host-PID container smoke, and the DWARF performance regression check. Remote logs confirm the three ELF regression tests and four static-scope runtime cases actually executed.Based directly on current main, including the merged main-module identity recovery fix.