chore: merge train 236 (v0.5.1615) - #10790
Merged
Merged
Conversation
added 2 commits
September 20, 2026 09:15
Main-applicable extraction of PR #10403, which targets the draft turnloop/integration branch (375 commits off main) and cannot land as it stands. The turnloop-only half stays in #10403. windows-msvc lowered try/catch to SEH funclets, and LLVM's rewrite-statepoints-for-gc does not support funclet EH, so a Windows module containing a try could have precise moving-GC roots or compile, never both. It now emits the same single landingpad shape as ELF/Mach-O under Perry's own personality; LLVM then classifies the function as non-funclet EH and emits an Itanium GCC_except_table on COFF, which a new x64 language handler in eh_windows.rs walks and transfers through RtlUnwindEx. The LSDA decoder moves out of eh.rs into eh_lsda.rs verbatim so both personalities share it. For every non-Windows target triple the emitted IR is unchanged: the branch removed from emit_eh_dispatch and from declare_phase_b_strings_part2 already selected the landingpad arm there, and needs_eh_funclets()/ declare_seh_machinery() had no callers outside the Windows path. Also: perry-ext-http reports libuv's err.errno on Windows rather than a negated Winsock number (non-Windows arm byte-identical); the malloc-trim telemetry test asks the mimalloc purge witness instead of an OS list; and node_compat_matrix.mjs honours PERRY_BIN, finds a produced .exe, and raises the cold-compile timeout that was fabricating prefix divergences. Not carried, because main already fixes them in 7b90108 and with an existing cfg_attr(ignore): the lru-subclass feature plus perry.exe link shim, perry-ui-windows-winui's reorder_child, and the heap_generation funnel-assert rewrite. Validated on macOS/aarch64 only. No Windows behavioural claim from #10403 is re-verified here.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (16)
✨ Finishing Touches📝 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 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.
Merge train 236 — a Windows-platform extraction, released as v0.5.1615.
What this is
The main-applicable subset of PR #10403 ("Windows: make the platform buildable and Node-correct end-to-end"), extracted onto
mainwith the author's authorship preserved. 13 files, +810/−473.#10403 cannot land as it stands: its base is
turnloop/integration, a draft branch whose merge-base withmainisfcd108bfb0(v0.5.1579) — 375 commits back. By its own accounting nine of its ten defects are pre-existing onmain, and the diff separates cleanly along a subsystem line. That PR stays open for the turnloop half.The headline is that Windows had no precise GC roots at all: #7302 moved EH to
invoke/landingpadbecause longjmp could skip a statepoint relocation write-back (#7174); on windows-msvc that lowering becomes SEH funclets, andrewrite-statepoints-for-gcdies on funclets. So Windows could have precise roots ortry, never both — and since essentially all async lowers to atry, the whole surface was unreachable except with the collector in fallback mode. This puts windows-msvc on the same Itanium landingpad shape as ELF/Mach-O with Perry's own personality.The EH change is unconditional in source. Here is why it is still inert off Windows.
This is the only part with host blast radius, so it was verified from the diff rather than accepted:
The deleted branch was never
cfg(windows)— it was a runtime string test on the target triple, false foraarch64-apple-darwinandx86_64-unknown-linux-gnu. What survives is the oldelsearm de-indented: same personality, oneeh.lpad, same landingpad. Off Windows this is a no-op refactor, and that is a property of the source rather than a measurement. Same forneeds_eh_funcletsincodegen/mod.rs, whose predicate wastarget_triple.contains("-windows-") && any(personality).eh.rs's decoder relocation into the neweh_lsda.rswas verified byte-identical.Three of #10403's defects were dropped, because
mainmoved past themmainpicked up7b90108d17("unbreak the MSVC compiler link and the WinUI widget backend") anddf29edbe46in the intervening 375 commits. Carrying these would not have been merely redundant:reorder_child— a duplicate definition (E0428).mainalready has it, with aparent <= 0guard the PR's version lacks.lru-subclassCargo-feature treatment —mainfixes the seven LNK2019s with MSVC/ALTERNATENAMEweak defaults, and7b90108d17's own message rejects the feature approach: "A Cargo feature cannot express 'this link has no provider'." The PR'sjs_lru_cache_*definitions inperry.exewould shadow those alternates. Moot regardless — v0.5.1612 removed the lru-cache binding entirely.gc/tests/heap_generation.rs—mainalready carries thenot(debug_assertions)ignore plus a note reading "Do NOT 'fix' the test instead." The PR's rewrite is inert behind that ignore anyway.Two edits beyond #10403's diff, both required
#10403's branch does not compile off Windows, because
eh.rsis#[cfg(not(windows))]and its Windows-only validation never built it. As extracted it producedE0603(eh_walker.rs:948callscrate::eh::find_landing_pad_in_lsda, which the move made private — that caller does not exist on the PR's base) andE0425/E0433×6 from the LSDA unit tests losingDwarfReaderand theDW_EH_PE_*constants. The tests moved intoeh_lsda.rsand now run on every host — five pass, includingaction_zero_pad_is_still_a_handler(the #8082 invariant).DispatcherContextalso becamepub, since it appears inpub fn perry_eh_personality's signature andprivate_interfacesis a hard error under-D warnings.Open risk, recorded rather than assumed away
ARM64 Windows is unverified and its guard cannot discriminate.
DispatcherContextis documented as the x64DISPATCHER_CONTEXT, carriesoffset_of!asserts at 0x38/0x40, and is notcfg(target_arch)-guarded — whilewindows-arm64-buildis a live CI job. Both targets are LP64, so those asserts pass whether or not the ARM64 layout is right. The fields the handler reads do appear to sit at matching offsets in the documented layout, so it is probably fine — but "probably fine, and the assert can't fail" is exactly the shape CLAUDE.md's ★ section is about. In the changelog fragment.And this train does not prove what #10403 exists to do. It shows Windows EH compiles and that nothing else regressed. That Windows actually gets precise roots — the
.pgcmappresent-vs-absent A/B — needs the author's box, and a green build here should not be read as confirming it.Validation
Assembled on
1afa961894; source head asserted fresh; no attribution trailers; author preserved. Nine cheap gates,cargo check --workspace --all-targetsunder-D warnings, all five pinned artifacts byte-identical before and after the sweep, six unit suites with an empty failing set,lintcomplete at 6-of-6 with nothing outside the known-red public-baseline step.Gap sweep at
PERRY_RUN_TIMEOUT=30, eight areas chosen for the exception-handling blast radius rather than for Windows, which cannot be exercised here —asyncis in the list because essentially all async lowers to atry. Every area asserted live, zero unexplained regressions: