Train 187r: startup, CJS, Wasm, Android TLS, regex and window fixes (v0.5.1565) - #10256
Merged
Merged
Conversation
…ler (#10144) The PR's borrow flag refused every nested store access, so a JavaScript import calling back into WebAssembly failed (import -> export returned InvalidExport; Emscripten invoke_*/dynCall trampolines and imports calling _malloc break). Publish each import callback's wasmi Caller as the innermost store context for the callback's extent and hand nested host operations a StoreContextMut borrowed from it; only the outermost operation uses the thread-local store. Overlapping access with no import boundary in between is still refused. Regressions: import -> export, import -> funcref-table function via perry_wasm_host_func_call, import -> standalone Global, and the refused overlap. The first three fail against the PR's guard.
…the raw-handle ratchet (#10144) The PR added three bare get_raw_mut_ptr reads to webassembly.rs (22 against its ceiling of 19), failing the bare raw_handle_debt.py run. Box the export closure through with_mut_ptr and route the instantiate(Module) result through a resolved_promise_value helper that roots the value before allocating the promise and passes the promise through scoped reads.
strip_comments_and_strings goes through from_utf8_lossy, so its offsets are not guaranteed to be char boundaries of (or even within) the stripped copy. Probe the byte range instead of slicing the String, so an unusual source cannot panic export discovery.
…s_gc_init tests (#10066) js_gc_init disables the process-wide class-field inline gate whenever typed feedback is active, and typed feedback is always active in test builds. The new empty-checkpoint and finalization-boundary tests call js_gc_init on a spawned thread, which isolates thread locals but not that atomic, and they sort directly before proxy::tests. The two whole-loop write-guard proofs then rejected at the gate (PERRY_TRACE_OBJECT_ARRAY_WRITE_GUARD: 'disabled gate') and published 0. Restore the gate after each js_gc_init test, and have the two proofs that require the gate establish it first.
Squashed net change of PR #10193 (head 15e2a76, based on 9fda98d): share compiled Perex programs across constructions via a bounded LRU keyed by source identity and canonical flags, guard canonical builtin test/replace dispatch, and assemble empty replacements from match spans. Fixes #10179. Merge-train resolution: scripts/gc_runtime_root_holders.json merged structurally with #10066's PASS1_MARKED audit note (both notes kept, source pins recomputed from the merged tree) and #10193's REGEX_DIAG removal.
added 5 commits
September 14, 2026 05:58
Use named static arrays so the captured method name and the lookup result have one identity across codegen units. This preserves the rooting tests without relying on anonymous literal pooling under thin LTO.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (196)
📝 WalkthroughWalkthroughChangesRuntime and compiler behavior
Validation and release
Estimated code review effort: 5 (Critical) | ~120 minutes ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 14, 2026
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.
Land the audited startup, live CJS re-export, WebAssembly re-entry, regex, Android TLS, and desktop window changes as Perry 0.5.1565. The train contains #10144, #10244, #10156, #10066, #10193, #10246, and #10245 through its originally assembled head
bfacdfb66b. PR #10245 remains open for the newer purity-inference follow-ups queued for the next train.Integration fixes preserve Caller-routed Wasm re-entry, meet the raw-handle ratchet, compare CJS descriptor prefixes by byte bounds, isolate the class-field inline test gate, gate the regex expando guard with its only caller, and give bound text methods canonical static names across release codegen units. Changelog fragments are keyed to their PRs. The owner explicitly approved #10193's 2.78% CSV slowdown.
Validation uses the approved fast protocol: each original PR's full gap, GC-stress, and cargo-test CI was compared with its main baseline, followed by targeted local validation of the combined tree.
index.js; the source and fixture are byte-identical to main, and Node reproduces the same error from an extracted main tree. All actualtest_gap_*reexport*cases pass. Crypto is 16 passing, one inherited suite skip, and one catalog-enumeration mismatch: the train reports exactly main's unchanged literal tables (15 ciphers, six curves, 17 hashes), while Node exposes 130/82/52. All six actual cryptotest_gap_*cases pass. Neither the skip list nor the crypto stdlib changes in this train.CI baselines: main before the earlier PRs and current main. The current baseline has three gap failures (static helpers, DisposableStack, and iterator-prototype patching) and the known native-stack cargo-test failure. The older HTTP/2 gap/GC failure is confined to the earlier baseline comparison.
Closes #10153
Closes #10179
Closes #10170
Closes #10219
Summary by CodeRabbit
frameAutosaveName.beforeExithandling.