Repository navigation
Conversation
Use CPUID and OSXSAVE/XCR0 checks on Darwin, with the existing SSE probe trampoline when AVX is unavailable. Gate AVX2 on usable AVX and its CPUID feature bit. Refs openclaw/openclaw#181032.
steipete
marked this pull request as ready for review
October 25, 2026 03:06
steipete
merged commit Oct 25, 2026
27c7030
into
openclaw:sync/replay-5e3554fa-native
7 checks passed
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs openclaw/openclaw#181032 and openclaw/openclaw#181123.
Darwin x64 assumes AVX is available and always selects a VEX-encoded probe trampoline. On macOS 14.8.9 under Rosetta, CPUID reports no AVX/OSXSAVE and XCR0 is zero, but the unpatched engine reports AVX available. Published Bun
807211511f(OpenClaw’s pin during verification) exits with SIGILL atvmovq %rax, %xmm0, followed byvsqrtsd, in the specialized sqrt thunk.Use the existing CPUID + OSXSAVE + XCR0 XMM/YMM-state checks on Darwin, gate AVX2 on usable AVX and its leaf-7 feature bit, and select the existing SSE probe trampoline when AVX is absent. All JIT tiers remain enabled. Upstream WebKit main at
29f79271764c9175cbfbce28a6b99348d5e2c394still has the Darwin assumption, so there was no upstream fix to port.807211511f, executable SHA-2562025e02c7a28a41f1fee69f6a16c7af8c01da796532f870e949721e66a0c3403, exits 132. LLDB captures the faulting VEX instructions. Debug-enabled copy and original have identical executable-text SHA-256e0301e2c0c60c91a92fa727edb2f7af996e76ddc8a184e730c42c20bc5f7ba10.109117749.261702.--no-retry, authoritative results checked. Required fixture variant counts: 17/17/17/17/1.7f836a97af610dd0e949e49658156321430fd4bd, linked to this engine: startup, JIT-heavy smoke and libc FFI pass under Rosetta. Engine version verified. Executable SHA-256decf67b14739579af369edef3c2894bec52f41ed107d46067a024da52d303746; macOS minimum 13.0.c5 fb 51 c0(vsqrtsd) in both variants. Ten interleaved pairs, one warmup per variant, CPU-affined numerical JIT benchmark: median candidate/baseline 0.999995652, gate ≤1.02, all checksums match. Baseline/candidate MacroAssembler objects and JSC executables are byte-identical; preprocessed text differs only by one blank line.The engine build incrementally replaces this translation unit in the released
419b5a0470fc059a610e98697691bf6f7cedd841ThinLTO archives and relinks the native proof tools. Its Source, stress harness and build recipe are identical to replay base3ab47948f3. The replacement object uses LLVM 23.1.4; native tool compilation, linking and the matched Bun build use LLVM 23.1.1. SDK metadata warnings from the released archives are retained in the proof logs. The Mac test build uses the repository's existing Darwin cross-link options withld64.lldand an explicit x64/macOS 13 target.Release-note context: restore Bun/JSC compatibility with supported x64 macOS CPUs that lack AVX. Thanks to @MacOSX4ever for the original report. The app supervisor change in openclaw/openclaw#181123 only mitigates repeated restarts; this addresses the engine's instruction selection.