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
@chaploud chaploud deleted the develop/bump-zwasm-v1.7.2 branch April 24, 2026 12:55
chaploud added a commit that referenced this pull request Apr 26, 2026
Self-review against the strategic-review notes and reference projects
flagged 7 files as high rot risk (empty stubs / aspirational tables /
premature deep-dives). Removed and listed in ROADMAP §15.2 with templates
so they can be created on demand later without losing the format.

Removed:
- .dev/handover.md           (memo files rot; recreate when actual session
                              state needs to outlive a chat thread)
- .dev/known_issues.md       (empty stub; create when first issue arises)
- .dev/compat_tiers.yaml     (aspirational; create at Phase 10 when first
                              src/lang/clj/ namespace lands)
- .dev/concurrency_design.md (premature; Phase-15 reality may diverge —
                              kept the summary in ROADMAP §7)
- .dev/wasm_strategy.md      (same; summary stays in ROADMAP §8)
- .claude/rules/compat_tiers.md  (auto-loads on src/lang/** which does not
                              exist yet; recreate at Phase 10)
- docs/README.md             (single placeholder line; redundant with the
                              main README and docs/ja/README.md)

Reworked the learning-doc gate (`scripts/check_learning_doc.sh`) so the
doc is the COMMIT THAT IMMEDIATELY FOLLOWS each source commit, not in the
same commit. This lets the doc's `commit:` front-matter cite the actual
SHA of the source commit it documents — no "TBD then patch" cycle.

- Rule 1: a doc commit must not contain source-bearing files (mixing
  defeats the SHA pairing).
- Rule 2: a commit following an unpaired source commit must be the doc.
- "Source-bearing" tightened to exclude `.dev/decisions/README.md` and
  `.dev/decisions/0000-template.md` (meta-metadata, not real ADRs).

Patched docs/ja/0001 and 0002 front-matter `commit:` to actual SHAs
(116b874, ac2e2b9). Updated ROADMAP §11.6 #1, §12.2, §15.1, §15.2,
§17 history; updated SKILL.md, .dev/README.md, .dev/decisions/README.md,
CLAUDE.md to reflect the new flow.
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