Skip to content

Bump zwasm v1.6.1 → v1.7.2#1

Merged
chaploud merged 1 commit intomainfrom
develop/bump-zwasm-v1.7.2
Apr 21, 2026
Merged

Bump zwasm v1.6.1 → v1.7.2#1
chaploud merged 1 commit intomainfrom
develop/bump-zwasm-v1.7.2

Conversation

@chaploud
Copy link
Copy Markdown
Contributor

Summary

  • Bumps the zwasm dependency from v1.6.1 to v1.7.2.
  • v1.7.2 fixes an ARM64 JIT remainder bug (`rd == rs2` aliasing) that surfaces in `02_tinygo_test` — TinyGo's `gcd` lowers to IR `r3 = r0 % r3`, and after JIT compilation (HOT_THRESHOLD=3) the loop produced wrong remainders and spun for minutes.
  • Also picks up v1.7.1 (invoke() settings persistence + build options + spec bump) and v1.7.0 (SIMD JIT, memory64 fix, FD-based WASI, JIT correctness sweep).

Test plan

  • `bash test/run_all.sh`: zig test, ReleaseSafe build, `cljw test` (83 namespaces, 0 failures), e2e wasm, deps.edn e2e — all PASS
  • Binary size: 4.76 MB (≤ 5.0 MB)
  • Startup: 4.5 ms ± 0.6 ms (≤ 6 ms)
  • RSS: 7.65 MB (≤ 10 MB)
  • `bash bench/wasm_bench.sh --quick`: gcd completes in 66.2 ms (was hanging on v1.7.0/v1.7.1)

Regression context

Investigated at the zwasm side: the prior fix for rem aliasing (zwasm v1.7.1) covered only `rd == rs1`. The register allocator can also assign the destination to the same physical register as the divisor; in that case UDIV clobbered the divisor before MSUB could use it. zwasm v1.7.2 now preserves whichever operand the destination aliases and adds a regression test.

Picks up:
- ARM64 JIT remainder fix (rd == rs2 aliasing). Surfaced here via
  02_tinygo_test: TinyGo's gcd lowered to IR `r3 = r0 % r3` produced
  wrong remainders after HOT_THRESHOLD JIT compilation, causing the
  loop to spin for minutes.
- Preserve caller-set vm.* settings across invoke() (v1.7.1).
- -Dpic / -Dcompiler-rt build options (v1.7.1).
- Spec testsuite bumped to f9c743a (v1.7.1).
- v1.7.0 contents (SIMD JIT, memory64 fix, FD-based WASI config,
  JIT correctness sweep) previously inaccessible due to the rem bug.

Commit Gate (Mac):
- run_all.sh: zig test, ReleaseSafe build, cljw test (83 ns),
  e2e wasm, deps.edn e2e — all PASS
- Binary 4.76 MB (≤ 5 MB), startup 4.5 ms (≤ 6 ms), RSS 7.65 MB (≤ 10 MB)
- wasm_bench.sh --quick: gcd 66.2 ms (was hanging on v1.7.0/v1.7.1)
@chaploud chaploud merged commit 4b7437f into main Apr 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant