Skip to content

Baseline macOS x64 — WebAssembly fix (bun + opencode 1.18.1)

Latest

Choose a tag to compare

@tobocop2 tobocop2 released this 15 Jul 17:12

Fixes the WebAssembly crash. The previous release fixed startup and plain JIT code on Macs with no AVX, but any WebAssembly workload still died with SIGILL.

JSC assumed AVX on macOS in two places, not one. The first release fixed the feature detection (collectCPUFeatures()); the probe trampoline still used vmovaps unconditionally, and WebAssembly reaches it via BBQ loop OSR entry, tier-up, and the catch prologue. Both are now fixed — oven-sh/WebKit#292.

Caught in code review on that PR, after I had wrongly assumed the trampoline was only reachable from debug-gated paths.

Verified — Apple M1 under Rosetta 2 (no AVX), macOS 14.6.1

test first release previous release this release
bun --version ❌ 132 ✅ rc=0 ✅ rc=0
JIT-heavy loop ❌ 132 ✅ rc=0 ✅ rc=0
WebAssembly hot loop ❌ 132 132 rc=0
opencode --version ❌ 132 ✅ rc=0 ✅ rc=0
14-case suite ❌ SIGILL ✅ ALL PASS ✅ ALL PASS

Not yet confirmed on real pre-AVX silicon. Rosetta 2 reports no AVX and matched a real Xeon X5690 exactly on the first release, which is what makes it a usable proxy — but it is emulation, not Westmere. Reports from a real pre-AVX Mac welcome.

Notes

The bun inside is built from bun main @ 1e35118008 and self-reports 1.4.0-canary.1. It is not an official 1.3.14/1.18.x baseline — the release tag tracks opencode's version, not bun's.

e7ede2b3f9361f6a9875f75cd79c6d0d7c90af373c290fe207a3e3a80882aa01  bun-darwin-x64-baseline
f425f035a5f00a93e1ba93d426e6687a0b58a1443b594ea75d8b35d99d11bd7f  opencode-darwin-x64-baseline

Upstream: WebKit#290 (baseline WebKit) → bun#34207 (build lane) → WebKit#292 (JIT AVX detection + probe trampoline). Tracked in bun#34215.