Bump WebKit: Windows GC conservative-scan hardening (preview) - #36772
Draft
robobun wants to merge 1 commit into
Draft
Bump WebKit: Windows GC conservative-scan hardening (preview)#36772robobun wants to merge 1 commit into
robobun wants to merge 1 commit into
Conversation
Contributor
|
Found 11 issues this PR may fix:
🤖 Generated with Claude Code |
Picks up oven-sh/WebKit#382 (87d87c14), which is on top of WebKit main 9f8f24db19. Four changes to the Windows conservative stack scan: - Thread::getRegisters: RELEASE_ASSERT on GetThreadContext failure and return only the populated CONTEXT_INTEGER|CONTEXT_CONTROL prefix (256 bytes on x64 instead of sizeof(CONTEXT)=1232). - MachineThreads::tryCopyOtherThreadStack: value-initialize PlatformRegisters so unpopulated bytes scan as zero, not stale collector stack. - Thread::suspend: retry transient SuspendThread/GetThreadContext failures (spin then Sleep, up to 100 attempts). tryCopyOtherThreadStacks now RELEASE_ASSERTs if a live thread still cannot be suspended rather than silently skipping its roots. - RegisterState: use the explicit callee-save inline-asm capture on clang-cl (Win64 variant with rbx/rbp/rdi/rsi/r12-r15) instead of the 256-byte setjmp fallback. Also adds rbp to the SysV x86_64 list. Also pulls in the intervening WebKit-main commits 34c01d13..9f8f24db (shorthand-in-arrow arguments-capture fix, CodeBlock-aging gating, Dockerfile.windows CI fixes).
robobun
force-pushed
the
farm/c9105e62/webkit-win-gc-hardening
branch
from
August 2, 2026 11:06
cb5ce0d to
b6078c2
Compare
Collaborator
Author
|
CI summary for
WebKit CI for 87d87c14 is all green (41/41 jobs) across all platforms including Windows x64/arm64 debug/release/asan/lto. No regressions observed. Ready to merge oven-sh/WebKit#382 to |
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.
Bumps WebKit to oven-sh/WebKit#382 (
autobuild-preview-pr-382-87d87c14) to exercise the Windows GC conservative-scan hardening in Bun's CI.Changes picked up (four commits in the WebKit PR):
Thread::getRegisters(Windows):RELEASE_ASSERTonGetThreadContextfailure (withGetLastError()in crash info) and return only the populatedCONTEXT_INTEGER | CONTEXT_CONTROLprefix (256 bytes on x64 vssizeof(CONTEXT)= 1232) so the conservative root scan does not copy uninitialized collector stack.MachineThreads::tryCopyOtherThreadStack: value-initializePlatformRegistersso unpopulated bytes scan as zero, not staleSlotVisitorframes. Platform-independent.Thread::suspend(Windows): retry bothSuspendThreadandGetThreadContextwith spin-then-Sleep(1)backoff (up to 100 attempts) for transient failures.tryCopyOtherThreadStacks:RELEASE_ASSERTif a live thread still cannot be suspended instead of silently skipping its roots. (A thread that has completeddidExit()is already removed from the group under the lock we hold, so there is no exited-thread case to tolerate.)RegisterState.h: gate the explicit callee-save inline-asm capture onCOMPILER(GCC_COMPATIBLE) || COMPILER(CLANG)(clang-cl defines__clang__but not__GNUC__, and accepts GNU inline asm) and add a Win64 variant capturingrbx, rbp, rdi, rsi, r12-r15. Also addsrbpto the SysV x86_64 list. MSVC proper keeps thesetjmpfallback.Also pulls in the intervening WebKit
maincommits34c01d13..9f8f24db(shorthand-in-arrowargumentscapture fix, CodeBlock-aging gating off by default,Dockerfile.windowsCI fixes).Do not merge until oven-sh/WebKit#382 lands on
main; then re-pointWEBKIT_VERSIONat the merged sha.no test proof · iteration 1 · build/CI scripts only; test-proof not applicable