Skip to content

Upgrade WebKit to 39862040be27 - #30096

Merged
Jarred-Sumner merged 1 commit into
mainfrom
claude/webkit-upgrade-6cc6aff
May 2, 2026
Merged

Upgrade WebKit to 39862040be27#30096
Jarred-Sumner merged 1 commit into
mainfrom
claude/webkit-upgrade-6cc6aff

Conversation

@Jarred-Sumner

Copy link
Copy Markdown
Collaborator

Bumps WEBKIT_VERSION to oven-sh/WebKit@181881a5aadc — see oven-sh/WebKit#210.

Syncs with upstream WebKit 6cc6aff95e13 (226 commits, 48 in JSC/WTF/bmalloc) and includes the BBQCallee keepalive fix from oven-sh/WebKit#209.

Highlights:

  • Wasm RTT canonicalization refactor (supersedes the #63906 cherry-pick)
  • DFG/FTL: word-at-a-time 8-bit string equality, bit-rotate idiom in B3, IntegerRangeOptimizations improvements, NewTypedArray zero-fill unroll
  • Module loader: star-export graph walked once, resolution cache only for star/indirect
  • DateCache slow-init workaround for recent ICU
  • libpas: upstream now carries pas_process_is_shutting_down() TLS guard

No JSType.h changesJSType.zig unchanged.

Header reshuffling (5cdc5c93d15b) moved several inline definitions into *InlinesLight.h headers and added JSDOMBindingFacade.h. Local build of Bun against this WebKit compiled clean; if CI surfaces missing-include errors in src/bun.js/bindings/webcore/, compare against Source/WebCore/bindings/scripts/test/JS/*.cpp for the new include set.

Supersedes oven-sh/WebKit#209.

@robobun

robobun commented May 2, 2026

Copy link
Copy Markdown
Collaborator
Updated 8:07 AM PT - May 2nd, 2026

@Jarred-Sumner, your commit aeac651 has 2 failures in Build #50178 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 30096

That installs a local version of the PR into your bun-30096 executable, so you can run:

bun-30096 --bun

@coderabbitai

coderabbitai Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7aac3439-ab40-4c02-8000-44be2f9eff98

📥 Commits

Reviewing files that changed from the base of the PR and between 2996fe0 and aeac651.

📒 Files selected for processing (1)
  • scripts/build/deps/webkit.ts

Walkthrough

This PR updates the exported WEBKIT_VERSION constant in scripts/build/deps/webkit.ts from commit hash 6ef83cb658722ff1f33f4a4c9335fb094bed4c6b to 39862040be27e0b6e1d103aaa5dc6796f21a581f, changing the default value used when computing prebuilt WebKit artifact URLs/identity.

Changes

WebKit Version Bump

Layer / File(s) Summary
Version constant
scripts/build/deps/webkit.ts
WEBKIT_VERSION value changed from "6ef83cb658722ff1f33f4a4c9335fb094bed4c6b" to "39862040be27e0b6e1d103aaa5dc6796f21a581f".
Prebuilt URL / identity derivation
scripts/build/deps/webkit.ts
The new default version value will be used by the existing prebuiltUrl()/tag derivation and prebuilt identity/cache-destination selection logic (no structural code changes).

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides comprehensive context about the upgrade, including the upstream sync, key highlights, and important implementation notes, but it does not follow the specified template structure. Restructure the description to follow the template: add 'What does this PR do?' and 'How did you verify your code works?' sections as headings.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: upgrading WebKit to a specific version. It directly corresponds to the file change updating WEBKIT_VERSION.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Review rate limit: 2/5 reviews remaining, refill in 25 minutes and 28 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Found 3 issues this PR may fix:

  1. Crash in DFG JIT: Illegal instruction in pas_utils.h (WTF::Vector<DFG::AbstractValue> resize) #29412 - Crash in DFG JIT via pas_utils.h assertion during libpas allocation in DFG CFA phase — the libpas pas_process_is_shutting_down() TLS guard fix addresses this class of failure
  2. Segfault in JIT worker thread during DFG LICM phase on macOS aarch64 (Bun v1.3.11) #28842 - Segfault in JIT worker thread during DFG LICM phase through libpas segregated page allocator — same libpas code path touched by this upgrade
  3. Array methods skip callbacks and return stale results #26534 - Array methods skip callbacks and return stale results due to DFG/FTL miscompilation — DFG optimization pipeline improvements in this upgrade may fix the unsafe memoization

If this is helpful, copy the block below into the PR description to auto-close these issues on merge.

Fixes #29412
Fixes #28842
Fixes #26534

🤖 Generated with Claude Code

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — straightforward WEBKIT_VERSION hash bump; CI will validate the actual build.

Extended reasoning...

Overview

This PR changes a single line in scripts/build/deps/webkit.ts, updating the WEBKIT_VERSION constant from 6ef83cb6... to 181881a5.... The substantive changes (226 upstream WebKit commits, BBQCallee keepalive fix, etc.) live in oven-sh/WebKit#210; this repo's diff is purely the version pin.

Security risks

None from the diff itself — it's a constant string update that selects which prebuilt tarball / git ref to pull from oven-sh's own WebKit fork. No new code paths, no auth/crypto/permissions changes.

Level of scrutiny

Low for the bun-side change. WebKit version bumps are a routine, well-established procedure here (the most recent commit on main is literally the previous one of these). The real review surface is the WebKit PR and the CI build/test matrix, not this one-line pin. The PR description is thorough — author confirmed JSType.h is unchanged (so no JSType.zig sync needed) and flagged the header-reshuffle risk with a remediation pointer if CI hits include errors.

Other factors

The only finding is a pre-existing stale doc path in .claude/commands/upgrade-webkit.md referencing the old SetupWebKit.cmake location — not introduced here and purely a drive-by nit. No outstanding reviewer comments. Buildkite is running; any actual breakage from the new WebKit will surface there.

Comment thread scripts/build/deps/webkit.ts Outdated
* From https://github.com/oven-sh/WebKit releases.
*/
export const WEBKIT_VERSION = "6ef83cb658722ff1f33f4a4c9335fb094bed4c6b";
export const WEBKIT_VERSION = "181881a5aadc46dafb8ae44d25cf21e2c321a4f0";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟣 Pre-existing nit, not introduced here: the /upgrade-webkit slash command at .claude/commands/upgrade-webkit.md:18 still says to update WEBKIT_VERSION in cmake/tools/SetupWebKit.cmake, which no longer exists — it now lives in scripts/build/deps/webkit.ts (which this PR correctly updated). Worth a drive-by fix since that file documents the exact procedure this PR performs.

Extended reasoning...

What's stale

.claude/commands/upgrade-webkit.md is the slash-command playbook for bumping WebKit. Line 18 instructs:

Update WEBKIT_VERSION in cmake/tools/SetupWebKit.cmake to the commit SHA of your new commit

That file no longer exists in the repo. WEBKIT_VERSION was moved to scripts/build/deps/webkit.ts:6 when the build system migrated from CMake helpers to the TS-based dep scripts — and indeed, that's exactly the file this PR edits.

Why it matters (mildly)

This is the documented procedure for the very operation this PR performs. The next person (or agent) who runs /upgrade-webkit will be told to edit a nonexistent file, then has to grep for WEBKIT_VERSION to find the real location. It's a minor speed bump rather than a correctness issue, but it's directly in scope for a WebKit-bump PR.

Step-by-step proof

  1. .claude/commands/upgrade-webkit.md:18 references cmake/tools/SetupWebKit.cmake.
  2. ls cmake/tools/SetupWebKit.cmake → no such file; glob for **/SetupWebKit.cmake returns nothing.
  3. grep -r WEBKIT_VERSION resolves to scripts/build/deps/webkit.ts:6 — the line this PR changes.
  4. Therefore the slash command points at a dead path while the live definition is in webkit.ts.

Why nothing else catches it

It's a markdown doc under .claude/commands/; nothing in the build or CI validates that the referenced path exists. The PR author clearly already knows the right location (they edited webkit.ts), so the staleness only bites whoever follows the written instructions next time.

Fix

One-line change in .claude/commands/upgrade-webkit.md:18:

- Update `WEBKIT_VERSION` in `cmake/tools/SetupWebKit.cmake` to the commit SHA of your new commit
+ Update `WEBKIT_VERSION` in `scripts/build/deps/webkit.ts` to the commit SHA of your new commit

Severity

pre_existing — not introduced by this PR, purely a stale internal doc. Flagging only because it's the documented workflow for exactly this change and the fix is trivial.

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

This PR may be a duplicate of:

  1. WebKit: fix wasm BBQCallee UAF in updateCallsitesToCallUs (astro-post.test.js Windows segfault) #30091 - Superseded: applies the BBQCallee UAF fix from wasm: keep weak BBQCallees alive across repatchNearCall in updateCallsitesToCallUs WebKit#209, which this PR incorporates
  2. Bump WebKit: align V8 heap snapshot output with Chrome DevTools expectations #29557 - Bumps WEBKIT_VERSION to an older hash for V8 heap snapshot alignment
  3. build: WebKit bump for bytecode-cache source-string fix #29506 - Bumps WEBKIT_VERSION for a bytecode-cache source-string fix
  4. build: test WebKit preview autobuild-preview-pr-187-0c3c8e5a #29580 - Bumps WEBKIT_VERSION to a preview build (autobuild-preview-pr-187)
  5. [DO NOT MERGE] bump WebKit to PR-188 prebuild (cross-platform bytecode) #29537 - Bumps WEBKIT_VERSION to a preview build (marked DO NOT MERGE)
  6. Bump WebKit to autobuild-preview-pr-185-309b1951 #29421 - Bumps WEBKIT_VERSION to a preview build (autobuild-preview-pr-185)

🤖 Generated with Claude Code

Comment thread scripts/build/deps/webkit.ts Outdated
* From https://github.com/oven-sh/WebKit releases.
*/
export const WEBKIT_VERSION = "6ef83cb658722ff1f33f4a4c9335fb094bed4c6b";
export const WEBKIT_VERSION = "c5293afddb249ee72b2e9b88f6856a8a374514f7";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟣 Pre-existing, but it directly affects the testing this PR receives: .buildkite/ci.mjs:670 (hasWebKitChanges()) still looks for SetupWebKit.cmake in the changed-files list — that file no longer exists, so the --jit-stress flag at line 683 and the 30-min timeout at line 719 are never applied on WebKit bumps. The predicate should check scripts/build/deps/webkit.ts instead. (Distinct from the .claude/commands/upgrade-webkit.md doc-staleness comment above — this one silently drops CI coverage.)

Extended reasoning...

What the bug is

.buildkite/ci.mjs:668-671 defines:

function hasWebKitChanges(options) {
  const { changedFiles = [] } = options;
  return changedFiles.some(file => file.includes("SetupWebKit.cmake"));
}

SetupWebKit.cmake no longer exists anywhere in the repo — WEBKIT_VERSION was migrated to scripts/build/deps/webkit.ts when the build moved to TS-based dep scripts (the very file this PR edits). So hasWebKitChanges() is now permanently false on every PR.

The code path

The function has exactly two consumers, both in getVerifyBaselineStep():

  • Line 683const jitStressFlag = hasWebKitChanges(options) ? " --jit-stress" : ""; — appended to bun scripts/verify-baseline.ts at line 723.
  • Line 719timeout_in_minutes: hasWebKitChanges(options) ? 30 : 10 — gives the JIT-stress run room to finish.

When the predicate is false, the verify-baseline step runs without --jit-stress and with a 10-minute timeout. Nothing errors; the extra coverage is just silently omitted.

Why nothing else catches it

There's no alternate check — grep for webkit.ts in .buildkite/ returns nothing. changedFiles is the Buildkite-computed list of paths touched by the PR, and "scripts/build/deps/webkit.ts".includes("SetupWebKit.cmake") is false. The step still appears in the pipeline and passes, so there's no signal that the JIT-stress mode was skipped.

Step-by-step proof on this PR

  1. This PR's only changed file is scripts/build/deps/webkit.ts.
  2. options.changedFiles = ["scripts/build/deps/webkit.ts"].
  3. .some(f => f.includes("SetupWebKit.cmake"))false.
  4. Line 683: jitStressFlag = ""; line 719: timeout_in_minutes = 10.
  5. Line 723 runs bun scripts/verify-baseline.ts --binary … --emulator … without --jit-stress.
  6. The JIT stress coverage that exists specifically to catch JSC regressions on WebKit upgrades does not run on this WebKit upgrade.

Impact

WebKit version bumps are precisely the PR class this check was added for — they pull in DFG/FTL/B3 changes (this one alone touches DFG/FTL string equality, B3 bit-rotate, IntegerRangeOptimizations, etc.). The --jit-stress baseline verification is the guardrail meant to shake those out under SDE emulation before merge. With the predicate dead, every WebKit bump since the CMake → TS migration has merged without that coverage.

Fix

 function hasWebKitChanges(options) {
   const { changedFiles = [] } = options;
-  return changedFiles.some(file => file.includes("SetupWebKit.cmake"));
+  return changedFiles.some(file => file.includes("scripts/build/deps/webkit.ts"));
 }

(Or check both paths if you want backward-compat with branches that pre-date the migration.)

Relationship to the earlier comment

This is not a duplicate of the .claude/commands/upgrade-webkit.md doc-staleness comment already on the PR. That one is a stale instruction in a markdown playbook; this one is a dead predicate in CI with concrete behavioral effect (lost test coverage + wrong timeout) on exactly this PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/build/deps/webkit.ts`:
- Line 6: The WEBKIT_VERSION constant in scripts/build/deps/webkit.ts points to
a commit tag ("a10fd987b87b7101a465d4f3faad0539d486adde") whose release has no
prebuilt assets and causes a 404; update the exported WEBKIT_VERSION value to a
valid WebKit release tag that actually publishes the
bun-webkit-linux-amd64.tar.gz asset (match the repo's release naming, e.g. the
"autobuild-<tag>" format), replace the string in WEBKIT_VERSION, and verify the
computed URL
https://github.com/oven-sh/WebKit/releases/download/autobuild-<NEW_VALUE>/bun-webkit-linux-amd64.tar.gz
returns HTTP 200 before committing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3f345d52-8dd7-4595-b575-30fe5c49d18e

📥 Commits

Reviewing files that changed from the base of the PR and between a013fe0 and b345510.

📒 Files selected for processing (1)
  • scripts/build/deps/webkit.ts

Comment thread scripts/build/deps/webkit.ts Outdated
@Jarred-Sumner

Copy link
Copy Markdown
Collaborator Author

⚠️ WEBKIT_VERSION is currently the PR-preview tag autobuild-preview-pr-210-a10fd987 so CI can pull prebuilts. Do not merge until oven-sh/WebKit#210 lands and this is repointed at the merge-commit SHA.

@Jarred-Sumner
Jarred-Sumner force-pushed the claude/webkit-upgrade-6cc6aff branch from 2996fe0 to aeac651 Compare May 2, 2026 09:35
@Jarred-Sumner Jarred-Sumner changed the title Upgrade WebKit to 181881a5aadc Upgrade WebKit to 39862040be27 May 2, 2026
@Jarred-Sumner

Copy link
Copy Markdown
Collaborator Author

WEBKIT_VERSION now points at oven-sh/WebKit@39862040be27 (main HEAD: #210 upstream sync + #209 BBQCallee + #211 ICU filter). Rebased on bun@7e57e529bf and squashed. Preview-tag note no longer applies — ready to merge once CI is green.

@Jarred-Sumner
Jarred-Sumner merged commit bff04ad into main May 2, 2026
74 of 77 checks passed
@Jarred-Sumner
Jarred-Sumner deleted the claude/webkit-upgrade-6cc6aff branch May 2, 2026 11:32
robobun added a commit that referenced this pull request May 5, 2026
…lated residual WebKit JIT crash)

WebKit hits ERROR_INVALID_ADDRESS (Windows error 487) in
VirtualAlloc(MEM_COMMIT) during IPInt→BBQ tier-up specifically on
ipint-bbq-osr-with-try3.js on Windows x64. Related BBQCallee UAF was
fixed via WebKit 39862040be27 (#30096 — already in this PR's canary)
but a residual access-violation in the IPInt→BBQ path remains on this
one fixture. The other ipint-bbq-osr-with-tryN.js fixtures pass.

Mirrors the test.todoIf pattern PR #30012 removed for JSPI Wasm
fixtures after their upstream fix landed. Scope-narrowed to exactly
one fixture on exactly one platform; the other 82 Wasm stress
fixtures continue to run normally on Windows x64.

Unrelated to embedded-native-module extraction (#29585) — the
VirtualAlloc failure is inside WebKit's wasm JIT tier-up path, which
this PR doesn't touch.
xhjkl pushed a commit to xhjkl/bun that referenced this pull request May 14, 2026
robobun added a commit that referenced this pull request May 16, 2026
…lated residual WebKit JIT crash)

WebKit hits ERROR_INVALID_ADDRESS (Windows error 487) in
VirtualAlloc(MEM_COMMIT) during IPInt→BBQ tier-up specifically on
ipint-bbq-osr-with-try3.js on Windows x64. Related BBQCallee UAF was
fixed via WebKit 39862040be27 (#30096 — already in this PR's canary)
but a residual access-violation in the IPInt→BBQ path remains on this
one fixture. The other ipint-bbq-osr-with-tryN.js fixtures pass.

Mirrors the test.todoIf pattern PR #30012 removed for JSPI Wasm
fixtures after their upstream fix landed. Scope-narrowed to exactly
one fixture on exactly one platform; the other 82 Wasm stress
fixtures continue to run normally on Windows x64.

Unrelated to embedded-native-module extraction (#29585) — the
VirtualAlloc failure is inside WebKit's wasm JIT tier-up path, which
this PR doesn't touch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants