Skip to content

[pull] main from oven-sh:main - #11

Merged
pull[bot] merged 2 commits into
coleleavitt:mainfrom
oven-sh:main
Jul 25, 2026
Merged

pull[bot] merged 2 commits into
coleleavitt:mainfrom
oven-sh:main

Conversation

@pull

@pull pull Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )


Summary by cubic

Fix Windows vectored exception handling to prevent re-execution loops and ensure AddressSanitizer sees faults first. Also make the eden-to-old generation ratio a tunable JSC option for smoother GC behavior.

  • Bug Fixes

    • Default VEH result to EXCEPTION_CONTINUE_SEARCH to avoid looping on faulting instructions.
    • Under ASAN_ENABLED, register the vectored handler behind AddressSanitizer to prevent spurious reports.
  • New Features

    • Added Options::minEdenToOldGenerationRatio (default 1.0 / 3.0) to control when a full GC is scheduled after an eden GC.

Written for commit b11589f. Summary will update on new commits.

Review in cubic

robobun and others added 2 commits July 24, 2026 15:19
…'s handler (#331)

* SignalsWin: return EXCEPTION_CONTINUE_SEARCH when no handler claims the fault

vectoredHandler() defaulted its result to EXCEPTION_EXECUTE_HANDLER and
returned it from a vectored exception handler. That constant is only valid
as an __except() filter result; a VEH must return either
EXCEPTION_CONTINUE_EXECUTION or EXCEPTION_CONTINUE_SEARCH. Returning 1 is
treated as continue-execution by the dispatcher, so an access violation no
WTF handler claimed would re-execute the faulting instruction, fault again,
and re-enter the handler in an unbounded loop until the stack was gone.

Because WTF installs itself first in the VEH chain, handlers registered
behind it (ASan's shadow-page committer is the obvious one) never saw
exceptions they own.

Default to EXCEPTION_CONTINUE_SEARCH so unclaimed faults continue down the
chain, matching the Mach (KERN_FAILURE) and POSIX (call old handler) paths
for SignalAction::NotHandled. The SignalAction::Handled case still returns
EXCEPTION_CONTINUE_EXECUTION as before.

* shorten comment

* SignalsWin: register the vectored handler behind AddressSanitizer's

Under ASAN_ENABLED, register the WTF vectored handler with First=0
instead of First=1. AddressSanitizer's runtime installs its own vectored
handler that commits shadow pages lazily and unpoisons the dispatch
context before the handlers behind it run. Registered ahead of it, the
WTF handler reads the CONTEXT record and the exception-dispatch stack
before ASan has unpoisoned them, so every fault produces spurious
stack-buffer reports attributed to the WTF handler. Registering behind
ASan removes those reports; non-ASan builds keep the existing first-slot
registration.

---------

Co-authored-by: Dylan Conway <[email protected]>
The 1/3 constant in Heap::updateAllocationLimits() schedules a full
collection after an eden GC whenever remainingHeapSize / maxHeapSize
falls below it. Since maxHeapSize = growthFactor * live and
remainingHeapSize is approximately (growthFactor - 1) * live in steady
state, this bounds the effective heap growth factor below at
1 / (1 - ratio) = 1.5. Any growth factor under 1.5 promotes every eden
GC to full.

Exposing it as Options::minEdenToOldGenerationRatio() (same 1/3 default,
no behavior change) lets embedders tune the growth factors below 1.5
without inducing full-GC thrash.
@pull pull Bot locked and limited conversation to collaborators Jul 25, 2026
@pull pull Bot added the ⤵️ pull label Jul 25, 2026
@pull
pull Bot merged commit b11589f into coleleavitt:main Jul 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant