Repository navigation
fix(node:vm): accept cached data when the JIT is unavailable - #118
Merged
Merged
Conversation
Adapt oven-sh#41769 while retaining owned bytecode payloads. Every run uses the ordinary unlinked program path. Co-authored-by: robobun <robobun@oven.sh>
This was referenced Oct 5, 2026
steipete
added a commit
that referenced
this pull request
Oct 5, 2026
Explicitly empty vm.Script cachedData now reports cachedDataRejected=true while preserving source execution and produceCachedData regeneration, matching Node 24. Extend the cachedData crash coverage from oven-sh#41769 and the credited standalone port in #118. Thanks @robobun for identifying and removing the constructor's unused JIT compilation. Preserve owned-payload decoding and the standalone fork-main boundary; no engine artifact or private-cache promotion changes. Add default, interpreter, baseline, DFG, and FTL subprocess coverage for produce/createCachedData round-trips, buffer mutation/GC, context execution, rejection, regeneration, and an actual older-version payload. Correct three stale constructor-column expectations in the Node VM suite without changing runtime stack behavior or weakening the other assertions. Validation: symbolized the Linux parent crash at 0x4e0. The patched interpreter, 2 GiB RLIMIT_AS, and systemd MemoryDenyWriteExecute cases pass. All 363 VM tests, 99 Node VM result rows, 47 fork-selection rows, and 98 OpenClaw consumer tests pass. Corrected Node fixtures also pass on unchanged main and Node 24. Complete P2 autoreview is scoped-clean. Both fork CI lanes, formatting, JavaScript lint, and source lints passed on exact head a915fd1. CI: https://github.com/openclaw/bun/actions/runs/37255516055 (attempt 1). Upstream proof: oven-sh#41769 (comment).
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.
Constructing
vm.Scriptwith validcachedDatacrashes when JavaScriptCore runs without a JIT, including when executable memory is unavailable. The constructor synchronously compiles a decoded block into a private executable, but every actual run usesunlinkedCodeBlockFor()and links its own program.Remove the unused JIT compilation and cached executable. Keep owned-byte decoding and source-key validation as the accept/reject check. Add a subprocess regression that disables the JIT and verifies
cachedDataRejected === falseand execution returning 42.Adapted from oven-sh#41769. Thanks @robobun; contributor credit is preserved in the commit.
Native Linux validation: the unchanged baseline reproduces SIGSEGV/exit 139; the corrected matched-engine build passes 358 VM tests (3 existing skips and 60 existing TODOs) and all 47 fork-selection results (45 files plus two dependency checks). The complete patch has a scoped-clean Codex P2 review. Hosted fork CI must pass on this branch before merge.
Hosted validation is green on
faa4dc840b29eb8528dee3b4c264e34a447ac909: Linux x64, macOS arm64, formatting, JavaScript lint, and source lints. The native run is https://github.com/openclaw/bun/actions/runs/37248965689/attempts/2. macOS needed a same-head retry after the unchanged wall-clock timeout fixture failed, as previously recorded in #105; no timeout assertion or runtime behavior was changed. The independent issue/duplicate-finder bot could not start because its provider credentials are not configured in the fork.