Repository navigation
Harden toolchain validation and preserve O0 IR - #216
Merged
Merged
Conversation
Signed-off-by: LunaStev <[email protected]>
Signed-off-by: LunaStev <[email protected]>
Signed-off-by: LunaStev <[email protected]>
Signed-off-by: LunaStev <[email protected]>
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.
Summary
Reject malformed toolchain inputs and preserve the original O0 program during verification and AST lowering. CLI output publication now preserves input files and existing artifacts on failure; the assembler and object/linker components validate expressions, relocations, symbols, and BSS content.
equdependencies with overflow/cycle diagnostics; distinguish branch relocations from data references, reject invalid ELF symbol extents and nonzero BSS payloads, scope local symbols to input objects, and reset symbol-resolution state between attempts.Motivation
These checks address accepted invalid programs, lost O0 source computations, destructive output failures, and incorrect object metadata in the foundation backlog.
Closes #16, closes #22, closes #23, closes #32, closes #36, closes #37, closes #38, closes #56, closes #62, closes #63, closes #64, closes #80, closes #81, closes #96, closes #142, closes #163, closes #211, closes #214.
Related: #95, #103, #215. The typed namespace/link-name migration across the complete object/linker pipeline remains separate work.
Target and compatibility impact
GlobalId, preservedConstExprvalues and localConstDeclinstructions. Printed IR includes preserved initializers. Consumers constructing globals directly must supply identity and expression fields.same-fileandtempfiledependencies for safe artifact publication. MSRV remains Rust 1.86. No external assembler is introduced.undefremoval and exact floating-point semantics remain follow-up work.Validation
Linux, Rust 1.96.0; Cargo dependencies resolved from the local cache:
cargo test --offline --workspace --locked: 104 passed.cargo test --offline --workspace --all-features: 123 passed.cargo clippy --offline --workspace --all-targets --locked -- -D warnings: passed.cargo clippy --offline --workspace --all-targets --all-features --locked -- -D warnings: passed.cargo fmt --all -- --checkandgit diff --check: passed.tools/ci_smoke.pypassed with socket disabled and enabled.python3 -m unittest discover -s tools -p 'test_*.py' -v: 8 passed.Windows/macOS execution and CI results are not claimed by these local checks. Complete native IR execution is not available and was not tested.
Checklist