Skip to content

Harden assembler, IR, and ELF validation; remove NASM dependency - #131

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
LunaStev:fix/toolchain-validation
Sep 22, 2026
Merged

LunaStev merged 1 commit into
wavefnd:masterfrom
LunaStev:fix/toolchain-validation

Conversation

@LunaStev

Copy link
Copy Markdown
Member

Summary

Malformed assembly and invalid IR/object structures could be accepted silently, producing incorrect code or ELF output. Reject these inputs with diagnostics, support valid r12 SIB indices, and restore coverage across all workspace crates and feature configurations.

  • Validate memory-expression syntax, signed displacement ranges, unexpected top-level tokens, and operand counts for zero-operand instructions. Add CLI checks that rejected input cannot create or overwrite output files.
  • Check IR return value types, missing type metadata, entry blocks, and all branch/switch destinations.
  • Validate ELF relocation section references, patch widths and ranges, checked offset arithmetic, and section alignment; explicitly reject unsupported BSS relocation destinations.
  • Restore four socket-lowering fixtures and run default/all-feature workspace tests with the committed lockfile in CI.
  • Remove the NASM comparison script, fixtures, CI dependency, and contributor instructions. Keep independent expected-byte and structural regression tests, including r12 coverage.

Adds 21 regression tests and updates the assembler CLI documentation and contributor commands.

Validation

  • cargo test --workspace --locked --offline — 35 passed.
  • cargo test --workspace --all-features --locked --offline — 40 passed.
  • cargo build --workspace --all-features --locked --offline — passed.
  • git diff --check — passed.
  • New regression test files and the IR verifier pass rustfmt --check.
  • cargo fmt --all -- --check still fails on pre-existing repository formatting. The unchanged base commit also fails this check; unrelated formatting was left out of this change.

The NASM-specific acceptance items in #26 and #79 are superseded by removing that dependency; byte-level regression tests and both Cargo feature configurations remain in place.

Fixes #13
Fixes #26
Fixes #27
Fixes #28
Fixes #29
Fixes #30
Fixes #31
Fixes #44
Fixes #45
Fixes #57
Fixes #58
Fixes #79

@LunaStev
LunaStev merged commit a254da9 into wavefnd:master Sep 22, 2026
1 check passed
This was referenced Sep 22, 2026
This was referenced Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment