mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
## Summary Add a CI step that runs JSC JIT stress tests under QEMU when `SetupWebKit.cmake` is modified. This complements #26571 (basic baseline CPU verification) by also testing JIT-generated code. ## Motivation PR #26571 added QEMU-based verification that catches illegal instructions in: - Startup code - Static initialization - Basic interpreter execution However, JIT compilers (DFG, FTL, Wasm BBQ/OMG) generate code at runtime that could emit AVX or LSE instructions even if the compiled binary doesn't. The JSC stress tests from #26380 exercise all JIT tiers through hot loops that trigger tier-up. ## How it works 1. Detects if `cmake/tools/SetupWebKit.cmake` is modified in the PR 2. If WebKit changes are detected, runs `verify-jit-stress-qemu.sh` after the build 3. Executes all 78 JIT stress test fixtures under QEMU with restricted CPU features: - x64: `qemu-x86_64 -cpu Nehalem` (SSE4.2, no AVX) - aarch64: `qemu-aarch64 -cpu cortex-a53` (ARMv8.0-A, no LSE) 4. Any SIGILL from JIT-generated code fails the build ## Platforms tested | Target | CPU Model | What it catches | |---|---|---| | `linux-x64-baseline` | Nehalem | JIT emitting AVX/AVX2/AVX512 | | `linux-x64-musl-baseline` | Nehalem | JIT emitting AVX/AVX2/AVX512 | | `linux-aarch64` | Cortex-A53 | JIT emitting LSE atomics, SVE | | `linux-aarch64-musl` | Cortex-A53 | JIT emitting LSE atomics, SVE | ## Timeout The step has a 30-minute timeout since QEMU emulation is ~10-50x slower than native. This only runs on WebKit update PRs, so it won't affect most CI runs. ## Refs - #26380 - Added JSC JIT stress tests - #26571 - Added basic QEMU baseline verification