Skip to content

Fix pre-release compiler, runtime validation and packaging regressions - #1135

Merged
LunaStev merged 6 commits into
wavefnd:masterfrom
LunaStev:fix/pre-release-audit-20261128
Nov 28, 2026
Merged

LunaStev merged 6 commits into
wavefnd:masterfrom
LunaStev:fix/pre-release-audit-20261128

Conversation

@LunaStev

@LunaStev LunaStev commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Summary

This pre-release audit fixes compiler behavior that changed with optimization or target selection, case runs that could pass without satisfying their runtime contract, and package inputs that could produce an incomplete or corrupt installation.

Area Changes and issues
Target selection Combine stacked #[target] conditions with AND. Preserve the next declaration and its source coordinates when removing an inactive item on the same line. Closes #1110. Closes #1111.
LLVM and semantic diagnostics Diagnose writes to known string-literal storage and trap indirect Wave writes to that storage, while preserving writable buffer views. Diagnose oversized variant payloads at their declaration. Reuse nonescaping aggregate temporaries in loops and return zero for signed MIN % -1, including compound assignments. Closes #1094. Closes #1107. Closes #1112. Closes #1125.
Case execution and cleanup Pass declared stdin and verify the real exit status. Validate the report schema, target, executor and shard. Parse CR, LF and CRLF metadata consistently, keep build-only flags out of check mode, and preserve the referent when cleaning a symlink. Closes #819. Closes #1095. Closes #1096. Closes #1100. Closes #1104.
SDK and release assets Verify gzip members and ZIP checksums before activating the SDK. Reject malformed checksum records and require a source identity when checking the std revision. Update the tooling pins to zip 9.4.2 and time 0.3.47. Closes #1097. Closes #1098. Closes #1114. Closes #1115.
Runtime libraries Respect ELF RPATH/RUNPATH ordering and inheritance. Carry the root executable's directory through Mach-O dependency resolution and include DLLs referenced by PE forwarded exports. Closes #1113.

Motivation

A signed remainder could fail at O0, a Windows-only declaration could enter Linux IR, and a package could ship a different library from the one selected by the original executable. The regressions exercise these outcomes through the compiler, case runner and package tools.

Target and compatibility impact

LLVM remains the default backend. The string write check preserves the existing raw pointer ABI. Within a Wave compilation, writes through buffer-backed strings still work, and dynamically resolved writes into literal storage trap before the store.

The following package loader regressions passed on native CI runners.

Validation

  • Wave CI on 5c8871e4 passed all 50 jobs, including extracted-package smoke tests on macOS and Windows for amd64 and arm64.
  • Rust 1.89.0 with LLVM 21.1.8 on Linux amd64. cargo +1.89.0 test --workspace --all-targets --locked --offline -j 2 --no-fail-fast passed 705 tests across 86 suites, with zero ignored. cargo +1.89.0 clippy --workspace --all-targets --locked --offline -j 2 -- -D warnings, wave-tools maintain format --check and git diff --check passed.
  • wave-tools check case-sources passed all 643 sources. The literal-write guard emitted IR and objects for 15 LLVM targets at O0 and O2. Exercised the writable-buffer and literal-write paths on Linux amd64, RISC-V under QEMU, and wasm32 WASI.
  • Built the Linux amd64 compiler and tools with the release profile, packaged them, verified the archive checksum and ran wave-tools check extracted-package. The extracted compiler found its bundled std in an isolated directory and executed the smoke program.
  • Cross-checked the tooling and test code with Cargo for x64 and arm64 Windows MSVC and macOS. Native macOS, Windows and FreeBSD execution are outside the local validation results.

Checklist

  • Commits include a DCO Signed-off-by line.
  • Tests cover the changed behavior.
  • User-facing changes include updated diagnostics and a description of string storage mutability.
  • The change preserves the license boundary between the compiler and std/.

Reject writes into string literals, check variant payload capacity and reuse nonescaping aggregate temporaries. Preserve zero for signed MIN remainder negative one and evaluate compound operands once.

Refs wavefnd#1094, wavefnd#1107, wavefnd#1112 and wavefnd#1125.

Signed-off-by: LunaStev <luna@lunastev.org>
Pass declared stdin and compare actual program exits. Check the report target and shard, preserve physical metadata lines, and keep check-only commands free of build flags. Clean the selected directory entry after checking ownership.

Refs wavefnd#819, wavefnd#1095, wavefnd#1096, wavefnd#1100 and wavefnd#1104.

Signed-off-by: LunaStev <luna@lunastev.org>
Validate ZIP entries and gzip trailers, including subsequent gzip members. Update the pinned zip and time dependencies and their lockfile resolutions.

Refs wavefnd#1114 and wavefnd#1115.

Signed-off-by: LunaStev <luna@lunastev.org>
Follow ELF search order, retain the executable context for Mach-O dependencies and collect PE export forwarders. Validate checksum record boundaries and require a source identity when checking the std revision.

Refs wavefnd#1097, wavefnd#1098, wavefnd#1113, wavefnd#1126 and wavefnd#1127.

Signed-off-by: LunaStev <luna@lunastev.org>
Mark normalized ZIP permissions with the Unix creator on every host. Run the frontend check regression against an enabled case target and expose native package loader test results in the macOS and Windows job logs.

Signed-off-by: LunaStev <luna@lunastev.org>
@LunaStev
LunaStev merged commit 70da3f4 into wavefnd:master Nov 28, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment